aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-03-24 16:14:13 -0400
committerJohn Newbery <john@johnnewbery.com>2017-03-28 16:15:38 -0400
commit1f3d78b4e099f22b03ffeec9e91c02de81430702 (patch)
treedefd3cfd2577db6d94ce65ef57ef20f160d1323e
parent0b9fb682890b8fe10cec54072b809a5efe57d33d (diff)
downloadbitcoin-1f3d78b4e099f22b03ffeec9e91c02de81430702.tar.xz
Wait for connection to open in bip9-softforks.py
bip9-sofforks.py stop-starts the bitcoind node twice during the test run, but it doesn't wait for the connection from mininode to open before continuing with the test. This leads to race conditions where the test can fail getblocktemplate() because it has no p2p connections.
-rwxr-xr-xtest/functional/bip9-softforks.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/functional/bip9-softforks.py b/test/functional/bip9-softforks.py
index 0dffd06e1a..60d262da81 100755
--- a/test/functional/bip9-softforks.py
+++ b/test/functional/bip9-softforks.py
@@ -200,16 +200,14 @@ class BIP9SoftForksTest(ComparisonTestFramework):
yield TestInstance([[block, False]])
# Restart all
- self.test.block_store.close()
+ self.test.clear_all_connections()
stop_nodes(self.nodes)
- shutil.rmtree(self.options.tmpdir)
+ shutil.rmtree(self.options.tmpdir + "/node0")
self.setup_chain()
self.setup_network()
- self.test.block_store = BlockStore(self.options.tmpdir)
- self.test.clear_all_connections()
self.test.add_all_connections(self.nodes)
- NetworkThread().start() # Start up network handling in another thread
-
+ NetworkThread().start()
+ self.test.test_nodes[0].wait_for_verack()
def get_tests(self):
for test in itertools.chain(