mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
Merge #17522: test: Wait until mempool is loaded in wallet_abandonconflict
dddd09eb33
test: Wait until mempool is loaded in wallet_abandonconflict (MarcoFalke) Pull request description: This might or might not fix intermittent issues such as https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/28724018#L4091 I believe the mempool was not loaded fully after the restart, in which case it was not dumped either on the next restart. Thus, the previous mempool was attempted to be loaded a second time, which succeeded and contained the txs. ACKs for top commit: laanwj: ACKdddd09eb33
Tree-SHA512: ab7061f946b5e5388f825dddceadb125f5197b24af3a7fcf1e700235d106a323419a56bfb4d84a2e27442e0de63e540c623b704343d83a98deaab3c02fcbdcbe
This commit is contained in:
commit
910a4301b1
1 changed files with 5 additions and 0 deletions
|
@ -18,6 +18,7 @@ from test_framework.util import (
|
|||
assert_raises_rpc_error,
|
||||
connect_nodes,
|
||||
disconnect_nodes,
|
||||
wait_until,
|
||||
)
|
||||
|
||||
|
||||
|
@ -97,6 +98,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
# TODO: redo with eviction
|
||||
self.stop_node(0)
|
||||
self.start_node(0, extra_args=["-minrelaytxfee=0.0001"])
|
||||
wait_until(lambda: self.nodes[0].getmempoolinfo()['loaded'])
|
||||
|
||||
# Verify txs no longer in either node's mempool
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
|
@ -124,6 +126,8 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
|
||||
self.stop_node(0)
|
||||
self.start_node(0, extra_args=["-minrelaytxfee=0.00001"])
|
||||
wait_until(lambda: self.nodes[0].getmempoolinfo()['loaded'])
|
||||
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
assert_equal(self.nodes[0].getbalance(), balance)
|
||||
|
||||
|
@ -144,6 +148,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
|||
# Remove using high relay fee again
|
||||
self.stop_node(0)
|
||||
self.start_node(0, extra_args=["-minrelaytxfee=0.0001"])
|
||||
wait_until(lambda: self.nodes[0].getmempoolinfo()['loaded'])
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("24.9996"))
|
||||
|
|
Loading…
Reference in a new issue