mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-02 03:31:35 +02:00
qa: Avoid start/stop of the network thread mid-test
This commit is contained in:
@ -20,7 +20,7 @@ from test_framework.messages import (
|
||||
uint256_from_compact,
|
||||
uint256_from_str,
|
||||
)
|
||||
from test_framework.mininode import P2PDataStore, network_thread_start, network_thread_join
|
||||
from test_framework.mininode import P2PDataStore
|
||||
from test_framework.script import (
|
||||
CScript,
|
||||
MAX_SCRIPT_ELEMENT_SIZE,
|
||||
@ -1299,7 +1299,6 @@ class FullBlockTest(BitcoinTestFramework):
|
||||
|
||||
Helper to connect and wait for version handshake."""
|
||||
self.nodes[0].add_p2p_connection(P2PDataStore())
|
||||
network_thread_start()
|
||||
# We need to wait for the initial getheaders from the peer before we
|
||||
# start populating our blockstore. If we don't, then we may run ahead
|
||||
# to the next subtest before we receive the getheaders. We'd then send
|
||||
@ -1314,7 +1313,6 @@ class FullBlockTest(BitcoinTestFramework):
|
||||
The node gets disconnected several times in this test. This helper
|
||||
method reconnects the p2p and restarts the network thread."""
|
||||
self.nodes[0].disconnect_p2ps()
|
||||
network_thread_join()
|
||||
self.bootstrap_p2p()
|
||||
|
||||
def sync_blocks(self, blocks, success=True, reject_code=None, reject_reason=None, request_block=True, reconnect=False, timeout=60):
|
||||
|
Reference in New Issue
Block a user