Skip to content

Commit f58c1f1

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#24739: test: Fix intermittent test failure in wallet_listreceivedby.py
fa1f6df test: Fix intermittent test failure in wallet_listreceivedby.py (MarcoFalke) Pull request description: * Remove not needed "Generate block to get out of IBD" * Sync blocks where possible to avoid incoming blocks on the p2p `msghand` thread while blocks are mined in the RPC thread. See bitcoin/bitcoin#24730 for discussion. Top commit has no ACKs. Tree-SHA512: eca0242e7793886535555fec62f7acd4c0955bf26fab78725b4fe53f84f0b118cb12c9ee35627503fc68b83c3a228842e861fab89aab1226e08e18596357aaae
2 parents bd616bc + fa1f6df commit f58c1f1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/functional/wallet_listreceivedby.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ def skip_test_if_missing_module(self):
2626
self.skip_if_no_cli()
2727

2828
def run_test(self):
29-
# Generate block to get out of IBD
30-
self.generate(self.nodes[0], 1)
31-
3229
# save the number of coinbase reward addresses so far
3330
num_cb_reward_addresses = len(self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True))
3431

@@ -172,7 +169,7 @@ def run_test(self):
172169
address = self.nodes[0].getnewaddress(label)
173170

174171
reward = Decimal("25")
175-
self.generatetoaddress(self.nodes[0], 1, address, sync_fun=self.no_op)
172+
self.generatetoaddress(self.nodes[0], 1, address)
176173
hash = self.nodes[0].getbestblockhash()
177174

178175
self.log.info("getreceivedbyaddress returns nothing with defaults")
@@ -212,7 +209,7 @@ def run_test(self):
212209
{"label": label, "amount": reward})
213210

214211
self.log.info("Generate 100 more blocks")
215-
self.generate(self.nodes[0], COINBASE_MATURITY, sync_fun=self.no_op)
212+
self.generate(self.nodes[0], COINBASE_MATURITY)
216213

217214
self.log.info("getreceivedbyaddress returns reward with defaults")
218215
balance = self.nodes[0].getreceivedbyaddress(address)

0 commit comments

Comments
 (0)