mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 20:28:55 +02:00
Merge #17522: test: Wait until mempool is loaded in wallet_abandonconflict
dddd09eb33d14fabda0aa40fa008b23b2bd6e589 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: ACK dddd09eb33d14fabda0aa40fa008b23b2bd6e589 Tree-SHA512: ab7061f946b5e5388f825dddceadb125f5197b24af3a7fcf1e700235d106a323419a56bfb4d84a2e27442e0de63e540c623b704343d83a98deaab3c02fcbdcbe
This commit is contained in:
commit
910a4301b1
@ -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…
x
Reference in New Issue
Block a user