diff --git a/test/functional/zapwallettxes.py b/test/functional/zapwallettxes.py index 963f229b42..6eff84565b 100755 --- a/test/functional/zapwallettxes.py +++ b/test/functional/zapwallettxes.py @@ -15,9 +15,11 @@ been zapped. """ from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import (assert_equal, - assert_raises_jsonrpc, - ) +from test_framework.util import ( + assert_equal, + assert_raises_jsonrpc, +) +from test_framework.mininode import wait_until class ZapWalletTXesTest (BitcoinTestFramework): @@ -58,6 +60,8 @@ class ZapWalletTXesTest (BitcoinTestFramework): self.stop_node(0) self.nodes[0] = self.start_node(0, self.options.tmpdir, ["-persistmempool=1", "-zapwallettxes=2"]) + wait_until(lambda: self.nodes[0].getmempoolinfo()['size'] == 1, timeout=3) + assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1) assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)