diff options
Diffstat (limited to 'test/functional/feature_block.py')
-rwxr-xr-x | test/functional/feature_block.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index 5959a8a541..17d3ddae4a 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -1299,7 +1299,13 @@ class FullBlockTest(BitcoinTestFramework): Helper to connect and wait for version handshake.""" self.nodes[0].add_p2p_connection(P2PDataStore()) network_thread_start() - self.nodes[0].p2p.wait_for_verack() + # 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 + # an INV for the next block and receive two getheaders - one for the + # IBD and one for the INV. We'd respond to both and could get + # unexpectedly disconnected if the DoS score for that error is 50. + self.nodes[0].p2p.wait_for_getheaders(timeout=5) def reconnect_p2p(self): """Tear down and bootstrap the P2P connection to the node. |