diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-06-16 00:32:18 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-06-21 14:30:03 +0200 |
commit | a79396fe5f8f81c78cf84117a87074c6ff6c9d95 (patch) | |
tree | 6d5a3a187d6968bd1c5236f1b20bb5ba7759628e /test/functional/feature_coinstatsindex.py | |
parent | 2ce7b47958c4a10ba20dc86c011d71cda4b070a5 (diff) |
test: remove `ToHex` helper, use .serialize().hex() instead
Diffstat (limited to 'test/functional/feature_coinstatsindex.py')
-rwxr-xr-x | test/functional/feature_coinstatsindex.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/feature_coinstatsindex.py b/test/functional/feature_coinstatsindex.py index cf270b25ee..48c6d82c13 100755 --- a/test/functional/feature_coinstatsindex.py +++ b/test/functional/feature_coinstatsindex.py @@ -22,7 +22,6 @@ from test_framework.messages import ( CTransaction, CTxIn, CTxOut, - ToHex, ) from test_framework.script import ( CScript, @@ -170,7 +169,7 @@ class CoinStatsIndexTest(BitcoinTestFramework): tx2 = CTransaction() tx2.vin.append(CTxIn(COutPoint(int(tx1_txid, 16), n), b'')) tx2.vout.append(CTxOut(int(20.99 * COIN), CScript([OP_RETURN] + [OP_FALSE]*30))) - tx2_hex = self.nodes[0].signrawtransactionwithwallet(ToHex(tx2))['hex'] + tx2_hex = self.nodes[0].signrawtransactionwithwallet(tx2.serialize().hex())['hex'] self.nodes[0].sendrawtransaction(tx2_hex) # Include both txs in a block @@ -207,7 +206,7 @@ class CoinStatsIndexTest(BitcoinTestFramework): block_time = self.nodes[0].getblock(tip)['time'] + 1 block = create_block(int(tip, 16), cb, block_time) block.solve() - self.nodes[0].submitblock(ToHex(block)) + self.nodes[0].submitblock(block.serialize().hex()) self.sync_all() self.wait_until(lambda: not try_rpc(-32603, "Unable to read UTXO set", index_node.gettxoutsetinfo, 'muhash')) |