aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p-acceptblock.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/p2p-acceptblock.py')
-rwxr-xr-xtest/functional/p2p-acceptblock.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/p2p-acceptblock.py b/test/functional/p2p-acceptblock.py
index d9d7c24416..bb204322ed 100755
--- a/test/functional/p2p-acceptblock.py
+++ b/test/functional/p2p-acceptblock.py
@@ -83,7 +83,7 @@ class AcceptBlockTest(BitcoinTestFramework):
# min_work_node connects to node1 (whitelisted)
min_work_node = self.nodes[1].add_p2p_connection(P2PInterface())
- NetworkThread().start() # Start up network handling in another thread
+ network_thread_start()
# Test logic begins here
test_node.wait_for_verack()
@@ -207,9 +207,13 @@ class AcceptBlockTest(BitcoinTestFramework):
# disconnect/reconnect first
self.nodes[0].disconnect_p2ps()
- test_node = self.nodes[0].add_p2p_connection(P2PInterface())
+ self.nodes[1].disconnect_p2ps()
+ network_thread_join()
+ test_node = self.nodes[0].add_p2p_connection(P2PInterface())
+ network_thread_start()
test_node.wait_for_verack()
+
test_node.send_message(msg_block(block_h1f))
test_node.sync_with_ping()
@@ -294,7 +298,7 @@ class AcceptBlockTest(BitcoinTestFramework):
self.nodes[0].disconnect_p2ps()
test_node = self.nodes[0].add_p2p_connection(P2PInterface())
- NetworkThread().start() # Start up network handling in another thread
+ network_thread_start()
test_node.wait_for_verack()
# We should have failed reorg and switched back to 290 (but have block 291)