Skip to content

Commit fadd0c1

Browse files
author
MarcoFalke
committed
[qa] zapwallettxes: Wait up to 3s for mempool reload
1 parent cce94c5 commit fadd0c1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/functional/zapwallettxes.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
been zapped.
1616
"""
1717
from test_framework.test_framework import BitcoinTestFramework
18-
from test_framework.util import (assert_equal,
19-
assert_raises_jsonrpc,
20-
)
18+
from test_framework.util import (
19+
assert_equal,
20+
assert_raises_jsonrpc,
21+
wait_until,
22+
)
2123

2224
class ZapWalletTXesTest (BitcoinTestFramework):
2325
def set_test_params(self):
@@ -56,6 +58,8 @@ def run_test(self):
5658
self.stop_node(0)
5759
self.start_node(0, ["-persistmempool=1", "-zapwallettxes=2"])
5860

61+
wait_until(lambda: self.nodes[0].getmempoolinfo()['size'] == 1, timeout=3)
62+
5963
assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1)
6064
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
6165

0 commit comments

Comments
 (0)