def test_whitelist(self): op = operations.Account_whitelist( **{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "authorizing_account": "1.2.0", "account_to_list": "1.2.1", "new_listing": 0x1, "extensions": [] }) ops = [Operation(op)] tx = transactions.Signed_Transaction(ref_block_num=ref_block_num, ref_block_prefix=ref_block_prefix, expiration=expiration, operations=ops) tx = tx.sign([wif], chain=prefix) tx.verify([PrivateKey(wif).pubkey], "BTS") txWire = hexlify(bytes(tx)).decode("ascii") compare = ("f68585abf4dce7c8045701070000000000000000000001010" "000011f14eef2978e40b369273907072dddf4b4043d9f3a08" "da125311c4e6b54b3e7c2a3606594fab7cf6ce381544eceda" "9945c8c9fccebd587cfa2d2f6a146b1639f8c") self.assertEqual(compare[:-130], txWire[:-130])
def test_whitelist(self): self.op = operations.Account_whitelist(**{ "fee": {"amount": 0, "asset_id": "1.3.0"}, "authorizing_account": "1.2.0", "account_to_list": "1.2.1", "new_listing": 0x1, "extensions": [] }) self.cm = ("f68585abf4dce7c8045701070000000000000000000001010" "000011f14eef2978e40b369273907072dddf4b4043d9f3a08" "da125311c4e6b54b3e7c2a3606594fab7cf6ce381544eceda" "9945c8c9fccebd587cfa2d2f6a146b1639f8c") self.doit()