def compareConstructedTX(self): self.maxDiff = None self.op = operations.Committee_member_create(**{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "committee_member_account": "1.2.0", "url": "foobar" }) ops = [Operation(self.op)] tx = 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], prefix) txWire = hexlify(bytes(tx)).decode("ascii") print("=" * 80) pprint(tx.json()) print("=" * 80) from grapheneapi.grapheneapi import GrapheneAPI rpc = GrapheneAPI("localhost", 8092) self.cm = rpc.serialize_transaction(tx.json()) print("soll: %s" % self.cm[:-130]) print("ist: %s" % txWire[:-130]) print(txWire[:-130] == self.cm[:-130]) self.assertEqual(self.cm[:-130], txWire[:-130])
def test_committee_create(self): self.op = operations.Committee_member_create(**{ "fee": { "amount": 0, "asset_id": "1.3.0" }, "committee_member_account": "1.2.0", "url": "foobar" }) self.cm = ("f68585abf4dce7c80457011d0000000000000000000006666f" "6f62617200011f26ced69cf1c79c7cd5be14092b15c9bd07f2" "a1ea988ac3dff2e8e706d72461b21bef9a8eda4c51b5d484f7" "8d31567ef7066d105bcd75c215f8d919673ea57c32") self.doit()