From 9e2897d020b114a10c860f90c5405be029afddba Mon Sep 17 00:00:00 2001 From: John Newbery Date: Sun, 19 Jul 2020 14:47:05 +0700 Subject: scripted-diff: Rename mininode_lock to p2p_lock -BEGIN VERIFY SCRIPT- sed -i 's/mininode_lock/p2p_lock/g' $(git grep -l "mininode_lock") -END VERIFY SCRIPT- --- test/functional/example_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/example_test.py') 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) -- cgit v1.2.3