Skip to content

Commit

Permalink
[qa] zapwallettxes: Wait up to 3s for mempool reload
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Sep 12, 2017
1 parent cce94c5 commit fadd0c1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/functional/zapwallettxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
wait_until,
)

class ZapWalletTXesTest (BitcoinTestFramework):
def set_test_params(self):
Expand Down Expand Up @@ -56,6 +58,8 @@ def run_test(self):
self.stop_node(0)
self.start_node(0, ["-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)

Expand Down

0 comments on commit fadd0c1

Please sign in to comment.