mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 11:33:46 +02:00
qa: Avoid start/stop of the network thread mid-test
This commit is contained in:
@@ -13,7 +13,7 @@ from test_framework.messages import (
|
||||
CTxIn,
|
||||
CTxOut,
|
||||
)
|
||||
from test_framework.mininode import network_thread_start, P2PDataStore, network_thread_join
|
||||
from test_framework.mininode import P2PDataStore
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
@@ -32,7 +32,6 @@ class InvalidTxRequestTest(BitcoinTestFramework):
|
||||
Helper to connect and wait for version handshake."""
|
||||
for _ in range(num_connections):
|
||||
self.nodes[0].add_p2p_connection(P2PDataStore())
|
||||
network_thread_start()
|
||||
self.nodes[0].p2p.wait_for_verack()
|
||||
|
||||
def reconnect_p2p(self, **kwargs):
|
||||
@@ -41,7 +40,6 @@ class InvalidTxRequestTest(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(**kwargs)
|
||||
|
||||
def run_test(self):
|
||||
|
Reference in New Issue
Block a user