Skip to content

Commit 910a430

Browse files
author
MarcoFalke
committed
Merge #17522: test: Wait until mempool is loaded in wallet_abandonconflict
dddd09e 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 dddd09e Tree-SHA512: ab7061f946b5e5388f825dddceadb125f5197b24af3a7fcf1e700235d106a323419a56bfb4d84a2e27442e0de63e540c623b704343d83a98deaab3c02fcbdcbe
2 parents 6fff333 + dddd09e commit 910a430

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/functional/wallet_abandonconflict.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
assert_raises_rpc_error,
1919
connect_nodes,
2020
disconnect_nodes,
21+
wait_until,
2122
)
2223

2324

@@ -97,6 +98,7 @@ def run_test(self):
9798
# TODO: redo with eviction
9899
self.stop_node(0)
99100
self.start_node(0, extra_args=["-minrelaytxfee=0.0001"])
101+
wait_until(lambda: self.nodes[0].getmempoolinfo()['loaded'])
100102

101103
# Verify txs no longer in either node's mempool
102104
assert_equal(len(self.nodes[0].getrawmempool()), 0)
@@ -124,6 +126,8 @@ def run_test(self):
124126
# Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned
125127
self.stop_node(0)
126128
self.start_node(0, extra_args=["-minrelaytxfee=0.00001"])
129+
wait_until(lambda: self.nodes[0].getmempoolinfo()['loaded'])
130+
127131
assert_equal(len(self.nodes[0].getrawmempool()), 0)
128132
assert_equal(self.nodes[0].getbalance(), balance)
129133

@@ -144,6 +148,7 @@ def run_test(self):
144148
# Remove using high relay fee again
145149
self.stop_node(0)
146150
self.start_node(0, extra_args=["-minrelaytxfee=0.0001"])
151+
wait_until(lambda: self.nodes[0].getmempoolinfo()['loaded'])
147152
assert_equal(len(self.nodes[0].getrawmempool()), 0)
148153
newbalance = self.nodes[0].getbalance()
149154
assert_equal(newbalance, balance - Decimal("24.9996"))

0 commit comments

Comments
 (0)