diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-29 10:35:53 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-29 10:56:48 +0100 |
commit | 1213be6c3a098a9955eab8bb7f44e16b761fcbb5 (patch) | |
tree | 5ecc7f2dfd3f0e7e45300a1a6094993b5289350a | |
parent | 9cf6393a4f82b9c81d3b4b468a17a89db10531a2 (diff) | |
parent | fa796bb695797810b90c7b6016fd4e9a1890f016 (diff) | |
download | bitcoin-1213be6c3a098a9955eab8bb7f44e16b761fcbb5.tar.xz |
Merge #12217: qa: Add missing syncwithvalidationinterfacequeue to tests
fa796bb qa: Add missing syncwithvalidationinterfacequeue to tests (MarcoFalke)
Pull request description:
Fixes intermittent travis failures with those tests caused by a missing flush of mempool txes to the wallet.
Tree-SHA512: 4f57c93a81af9c07b36c16996bf3e6bbb2af61779f0d6ae0126b64563eb4ec4b53f64241c9cf4c3f322db56f4339fd939319747653bebc93bbc7e3d5dceedda6
-rwxr-xr-x | test/functional/mempool_persist.py | 9 | ||||
-rwxr-xr-x | test/functional/wallet_zapwallettxes.py | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/test/functional/mempool_persist.py b/test/functional/mempool_persist.py index 31a96ec60e..17f0967219 100755 --- a/test/functional/mempool_persist.py +++ b/test/functional/mempool_persist.py @@ -66,16 +66,17 @@ class MempoolPersistTest(BitcoinTestFramework): self.log.debug("Stop-start the nodes. Verify that node0 has the transactions in its mempool and node1 does not. Verify that node2 calculates its balance correctly after loading wallet transactions.") self.stop_nodes() + self.start_node(1) # Give this one a head-start, so we can be "extra-sure" that it didn't load anything later self.start_node(0) - self.start_node(1) self.start_node(2) # Give bitcoind a second to reload the mempool - time.sleep(1) - wait_until(lambda: len(self.nodes[0].getrawmempool()) == 5) - wait_until(lambda: len(self.nodes[2].getrawmempool()) == 5) + wait_until(lambda: len(self.nodes[0].getrawmempool()) == 5, timeout=1) + wait_until(lambda: len(self.nodes[2].getrawmempool()) == 5, timeout=1) + # The others have loaded their mempool. If node_1 loaded anything, we'd probably notice by now: assert_equal(len(self.nodes[1].getrawmempool()), 0) # Verify accounting of mempool transactions after restart is correct + self.nodes[2].syncwithvalidationinterfacequeue() # Flush mempool to wallet assert_equal(node2_balance, self.nodes[2].getbalance()) self.log.debug("Stop-start node0 with -persistmempool=0. Verify that it doesn't load its mempool.dat file.") diff --git a/test/functional/wallet_zapwallettxes.py b/test/functional/wallet_zapwallettxes.py index 08afb87894..87f44b2737 100755 --- a/test/functional/wallet_zapwallettxes.py +++ b/test/functional/wallet_zapwallettxes.py @@ -59,6 +59,7 @@ class ZapWalletTXesTest (BitcoinTestFramework): self.start_node(0, ["-persistmempool=1", "-zapwallettxes=2"]) wait_until(lambda: self.nodes[0].getmempoolinfo()['size'] == 1, timeout=3) + self.nodes[0].syncwithvalidationinterfacequeue() # Flush mempool to wallet assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1) assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2) |