test: Fix intermittent sync_blocks failures

This commit is contained in:
MarcoFalke committed 2020-05-05 14:37:46 -04:00
1 parent e727c2bdca
commit fa3f9a0566
6 files changed
+42 -26

No files matched your search

+3 -3
View File
@@ -10,10 +10,10 @@
"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import wait_until
from test_framework.util import assert_equal
class ReindexTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
@@ -24,7 +24,7 @@ class ReindexTest(BitcoinTestFramework):
self.stop_nodes()
extra_args = [["-reindex-chainstate" if justchainstate else "-reindex"]]
self.start_nodes(extra_args)
wait_until(lambda: self.nodes[0].getblockcount() == blockcount)
assert_equal(self.nodes[0].getblockcount(), blockcount) # start_node is blocking on reindex
self.log.info("Success")
def run_test(self):