mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
[qa] zapwallettxes: Wait up to 3s for mempool reload
This commit is contained in:
parent
cce94c518a
commit
fadd0c16b6
1 changed files with 7 additions and 3 deletions
|
@ -15,9 +15,11 @@
|
||||||
been zapped.
|
been zapped.
|
||||||
"""
|
"""
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import (assert_equal,
|
from test_framework.util import (
|
||||||
assert_raises_jsonrpc,
|
assert_equal,
|
||||||
)
|
assert_raises_jsonrpc,
|
||||||
|
wait_until,
|
||||||
|
)
|
||||||
|
|
||||||
class ZapWalletTXesTest (BitcoinTestFramework):
|
class ZapWalletTXesTest (BitcoinTestFramework):
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
|
@ -56,6 +58,8 @@ class ZapWalletTXesTest (BitcoinTestFramework):
|
||||||
self.stop_node(0)
|
self.stop_node(0)
|
||||||
self.start_node(0, ["-persistmempool=1", "-zapwallettxes=2"])
|
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(txid1)['txid'], txid1)
|
||||||
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
|
assert_equal(self.nodes[0].gettransaction(txid2)['txid'], txid2)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue