Skip to content

Commit 45e826d

Browse files
MarcoFalkecodablock
authored andcommitted
Merge bitcoin#11308: [qa] zapwallettxes: Wait up to 3s for mempool reload
fadd0c1 [qa] zapwallettxes: Wait up to 3s for mempool reload (MarcoFalke) Pull request description: There had been intermittent test failures on zapwallettxes, as no time was allotted to reload the mempool. Tree-SHA512: 993254d2aaca6ea42fceefffed0cf90bdda91c64150179ef2a11337c3fe2cc6bf42b83ea9d9a1a575204fbde2676d7203443b00d053e8c2ed43e017c09d3ab11
1 parent 4a7525d commit 45e826d

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

@@ -58,6 +60,8 @@ def run_test(self):
5860
self.stop_node(0)
5961
self.nodes[0] = self.start_node(0, self.options.tmpdir, ["-persistmempool=1", "-zapwallettxes=2"])
6062

63+
wait_until(lambda: self.nodes[0].getmempoolinfo()['size'] == 1, timeout=3)
64+
6165
assert_equal(self.nodes[0].gettransaction(txid1)['txid'], txid1)
6266
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
6367

0 commit comments

Comments
 (0)