aboutsummaryrefslogtreecommitdiff
path: root/test/functional/mempool_persist.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-04 20:06:38 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-05 14:37:46 -0400
commitfa3f9a05660687bf4146e089050e944a1d6cbe3c (patch)
tree36f1337187c072c11244547806832ab73ba1721e /test/functional/mempool_persist.py
parente727c2bdcab3660297f452c76c6f877038015c02 (diff)
test: Fix intermittent sync_blocks failures
Diffstat (limited to 'test/functional/mempool_persist.py')
-rwxr-xr-xtest/functional/mempool_persist.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/mempool_persist.py b/test/functional/mempool_persist.py
index 99003d2d1f..3969da2eb0 100755
--- a/test/functional/mempool_persist.py
+++ b/test/functional/mempool_persist.py
@@ -95,8 +95,8 @@ class MempoolPersistTest(BitcoinTestFramework):
self.start_node(1, extra_args=["-persistmempool=0"])
self.start_node(0)
self.start_node(2)
- wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"], timeout=1)
- wait_until(lambda: self.nodes[2].getmempoolinfo()["loaded"], timeout=1)
+ assert self.nodes[0].getmempoolinfo()["loaded"] # start_node is blocking on the mempool being loaded
+ assert self.nodes[2].getmempoolinfo()["loaded"]
assert_equal(len(self.nodes[0].getrawmempool()), 6)
assert_equal(len(self.nodes[2].getrawmempool()), 5)
# The others have loaded their mempool. If node_1 loaded anything, we'd probably notice by now:
@@ -117,13 +117,13 @@ class MempoolPersistTest(BitcoinTestFramework):
self.log.debug("Stop-start node0 with -persistmempool=0. Verify that it doesn't load its mempool.dat file.")
self.stop_nodes()
self.start_node(0, extra_args=["-persistmempool=0", "-disablewallet"])
- wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"])
+ assert self.nodes[0].getmempoolinfo()["loaded"]
assert_equal(len(self.nodes[0].getrawmempool()), 0)
self.log.debug("Stop-start node0. Verify that it has the transactions in its mempool.")
self.stop_nodes()
self.start_node(0)
- wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"])
+ assert self.nodes[0].getmempoolinfo()["loaded"]
assert_equal(len(self.nodes[0].getrawmempool()), 6)
mempooldat0 = os.path.join(self.nodes[0].datadir, self.chain, 'mempool.dat')
@@ -137,7 +137,7 @@ class MempoolPersistTest(BitcoinTestFramework):
os.rename(mempooldat0, mempooldat1)
self.stop_nodes()
self.start_node(1, extra_args=[])
- wait_until(lambda: self.nodes[1].getmempoolinfo()["loaded"])
+ assert self.nodes[1].getmempoolinfo()["loaded"]
assert_equal(len(self.nodes[1].getrawmempool()), 6)
self.log.debug("Prevent bitcoind from writing mempool.dat to disk. Verify that `savemempool` fails")