From 854382885f18aa9a95cdde3d11591b05c305ad3f Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Sat, 11 Apr 2020 15:53:01 +0200 Subject: refactor: test: improve wait_for{header,merkleblock} interface The interfaces for the methods wait_for_header() and wait_for_merkleblock() are changed to take a hex string instead of an integer, improving type safety and removing the burden from the caller to always do the transformation via `int(...)`. As suggested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/18593#discussion_r407062253 --- test/functional/p2p_invalid_locator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/p2p_invalid_locator.py') 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)) -- cgit v1.2.3