test: remove ToHex helper, use .serialize().hex() instead

This commit is contained in:
Sebastian Falbesoner
2021-06-16 00:32:18 +02:00
parent 2ce7b47958
commit a79396fe5f
17 changed files with 128 additions and 102 deletions

View File

@ -5,8 +5,10 @@
"""Test that the wallet resends transactions periodically."""
import time
from test_framework.blocktools import create_block, create_coinbase
from test_framework.messages import ToHex
from test_framework.blocktools import (
create_block,
create_coinbase,
)
from test_framework.p2p import P2PTxInvStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
@ -48,7 +50,7 @@ class ResendWalletTransactionsTest(BitcoinTestFramework):
block = create_block(int(node.getbestblockhash(), 16), create_coinbase(node.getblockcount() + 1), block_time)
block.rehash()
block.solve()
node.submitblock(ToHex(block))
node.submitblock(block.serialize().hex())
# Set correct m_best_block_time, which is used in ResendWalletTransactions
node.syncwithvalidationinterfacequeue()