diff options
Diffstat (limited to 'test/functional/example_test.py')
-rwxr-xr-x | test/functional/example_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/example_test.py b/test/functional/example_test.py index 34e4999329..c997e47c5e 100755 --- a/test/functional/example_test.py +++ b/test/functional/example_test.py @@ -18,7 +18,7 @@ from test_framework.blocktools import (create_block, create_coinbase) from test_framework.messages import CInv, MSG_BLOCK from test_framework.mininode import ( P2PInterface, - mininode_lock, + p2p_lock, msg_block, msg_getdata, ) @@ -203,13 +203,13 @@ class ExampleTest(BitcoinTestFramework): # wait_until() will loop until a predicate condition is met. Use it to test properties of the # P2PInterface objects. - wait_until(lambda: sorted(blocks) == sorted(list(self.nodes[2].p2p.block_receive_map.keys())), timeout=5, lock=mininode_lock) + wait_until(lambda: sorted(blocks) == sorted(list(self.nodes[2].p2p.block_receive_map.keys())), timeout=5, lock=p2p_lock) self.log.info("Check that each block was received only once") # The network thread uses a global lock on data access to the P2PConnection objects when sending and receiving # messages. The test thread should acquire the global lock before accessing any P2PConnection data to avoid locking # and synchronization issues. Note wait_until() acquires this global lock when testing the predicate. - with mininode_lock: + with p2p_lock: for block in self.nodes[2].p2p.block_receive_map.values(): assert_equal(block, 1) |