mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-08 23:02:39 +02:00
qa: Avoid start/stop of the network thread mid-test
This commit is contained in:
@@ -90,7 +90,6 @@ from test_framework.mininode import (
|
||||
CBlockHeader,
|
||||
CInv,
|
||||
NODE_WITNESS,
|
||||
network_thread_start,
|
||||
P2PInterface,
|
||||
mininode_lock,
|
||||
msg_block,
|
||||
@@ -238,15 +237,11 @@ class SendHeadersTest(BitcoinTestFramework):
|
||||
return [int(x, 16) for x in all_hashes]
|
||||
|
||||
def run_test(self):
|
||||
# Setup the p2p connections and start up the network thread.
|
||||
# Setup the p2p connections
|
||||
inv_node = self.nodes[0].add_p2p_connection(BaseNode())
|
||||
# Make sure NODE_NETWORK is not set for test_node, so no block download
|
||||
# will occur outside of direct fetching
|
||||
test_node = self.nodes[0].add_p2p_connection(BaseNode(), services=NODE_WITNESS)
|
||||
|
||||
network_thread_start()
|
||||
|
||||
# Test logic begins here
|
||||
inv_node.wait_for_verack()
|
||||
test_node.wait_for_verack()
|
||||
|
||||
|
Reference in New Issue
Block a user