diff options
-rwxr-xr-x | test/functional/p2p_filter.py | 4 | ||||
-rwxr-xr-x | test/functional/p2p_invalid_locator.py | 2 | ||||
-rwxr-xr-x | test/functional/test_framework/mininode.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/p2p_filter.py b/test/functional/p2p_filter.py index aa2c92c277..b73d5784aa 100755 --- a/test/functional/p2p_filter.py +++ b/test/functional/p2p_filter.py @@ -68,13 +68,13 @@ class FilterTest(BitcoinTestFramework): self.log.info('Check that we receive merkleblock and tx if the filter matches a tx in a block') block_hash = self.nodes[0].generatetoaddress(1, filter_address)[0] txid = self.nodes[0].getblock(block_hash)['tx'][0] - filter_node.wait_for_merkleblock(int(block_hash, 16)) + filter_node.wait_for_merkleblock(block_hash) filter_node.wait_for_tx(txid) self.log.info('Check that we only receive a merkleblock if the filter does not match a tx in a block') filter_node.tx_received = False block_hash = self.nodes[0].generatetoaddress(1, self.nodes[0].getnewaddress())[0] - filter_node.wait_for_merkleblock(int(block_hash, 16)) + filter_node.wait_for_merkleblock(block_hash) assert not filter_node.tx_received self.log.info('Check that we not receive a tx if the filter does not match a mempool tx') diff --git a/test/functional/p2p_invalid_locator.py b/test/functional/p2p_invalid_locator.py index 33b7060060..58be703bf6 100755 --- a/test/functional/p2p_invalid_locator.py +++ b/test/functional/p2p_invalid_locator.py @@ -34,7 +34,7 @@ class InvalidLocatorTest(BitcoinTestFramework): msg.locator.vHave = [int(node.getblockhash(i - 1), 16) for i in range(block_count, block_count - (MAX_LOCATOR_SZ), -1)] node.p2p.send_message(msg) if type(msg) == msg_getheaders: - node.p2p.wait_for_header(int(node.getbestblockhash(), 16)) + node.p2p.wait_for_header(node.getbestblockhash()) else: node.p2p.wait_for_block(int(node.getbestblockhash(), 16)) diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index b17254faf8..beda7eeaba 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -393,7 +393,7 @@ class P2PInterface(P2PConnection): last_headers = self.last_message.get('headers') if not last_headers: return False - return last_headers.headers[0].rehash() == blockhash + return last_headers.headers[0].rehash() == int(blockhash, 16) wait_until(test_function, timeout=timeout, lock=mininode_lock) @@ -403,7 +403,7 @@ class P2PInterface(P2PConnection): last_filtered_block = self.last_message.get('merkleblock') if not last_filtered_block: return False - return last_filtered_block.merkleblock.header.rehash() == blockhash + return last_filtered_block.merkleblock.header.rehash() == int(blockhash, 16) wait_until(test_function, timeout=timeout, lock=mininode_lock) |