Skip to content

Commit c91f955

Browse files
author
MarcoFalke
committed
Merge bitcoin#19887: test: Fix flaky wallet_basic test
56b018c test: Fix flaky wallet_basic test (Fabian Jahr) Pull request description: Fixes bitcoin#19853 I investigated the issue in bitcoin#19876 and I still intend to fix the underlying issue of a race when using wallet RPCs right after starting a node in that PR. However, since that is a bit more complicated than I initially thought it makes sense to merge the fix of the test so the intermittent test failures stop. This fix in the test is going to be needed, either way, bitcoin#19876 will only provide an error where before it was reporting a false balance. Top commit has no ACKs. Tree-SHA512: 52bb2388a3e77aa20d26ab0fd45796bc1781483b1cffe49cbb44e2488a72e76998edfb1198495373f9c6fd2ec26064d4176bd1a64dd59806622d5e50a4f4e870
2 parents 0368931 + 56b018c commit c91f955

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/wallet_basic.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,9 @@ def run_test(self):
596596
# wait until the wallet has submitted all transactions to the mempool
597597
self.wait_until(lambda: len(self.nodes[0].getrawmempool()) == chainlimit * 2)
598598

599+
# Prevent potential race condition when calling wallet RPCs right after restart
600+
self.nodes[0].syncwithvalidationinterfacequeue()
601+
599602
node0_balance = self.nodes[0].getbalance()
600603
# With walletrejectlongchains we will not create the tx and store it in our wallet.
601604
assert_raises_rpc_error(-6, "Transaction has too long of a mempool chain", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))

0 commit comments

Comments
 (0)