소스 검색

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.
tags/v0.15.1
John Newbery 4 년 전
부모
커밋
1f3d78b4e0
1개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  1. 4
    6
      test/functional/bip9-softforks.py

+ 4
- 6
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(

Loading…
취소
저장