aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-04-27 08:44:18 +0200
committerMacroFake <falke.marco@gmail.com>2022-04-27 08:44:21 +0200
commitf58c1f1a446716a245ca204e2ac1a219455f1340 (patch)
tree3d68996e3826542452864c9bfbf25213468cfed5 /test
parentbd616bc16a3a7f70f60ca5034b5a91e5ac89ac9d (diff)
parentfa1f6df21ef3145d316bf891f268dd06efd6b9ba (diff)
downloadbitcoin-f58c1f1a446716a245ca204e2ac1a219455f1340.tar.xz
Merge bitcoin/bitcoin#24739: test: Fix intermittent test failure in wallet_listreceivedby.py
fa1f6df21ef3145d316bf891f268dd06efd6b9ba 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 https://github.com/bitcoin/bitcoin/issues/24730 for discussion. Top commit has no ACKs. Tree-SHA512: eca0242e7793886535555fec62f7acd4c0955bf26fab78725b4fe53f84f0b118cb12c9ee35627503fc68b83c3a228842e861fab89aab1226e08e18596357aaae
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_listreceivedby.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py
index 48b92796fc..a7f4f9ffaf 100755
--- a/test/functional/wallet_listreceivedby.py
+++ b/test/functional/wallet_listreceivedby.py
@@ -26,9 +26,6 @@ class ReceivedByTest(BitcoinTestFramework):
self.skip_if_no_cli()
def run_test(self):
- # Generate block to get out of IBD
- self.generate(self.nodes[0], 1)
-
# save the number of coinbase reward addresses so far
num_cb_reward_addresses = len(self.nodes[1].listreceivedbyaddress(minconf=0, include_empty=True, include_watchonly=True))
@@ -172,7 +169,7 @@ class ReceivedByTest(BitcoinTestFramework):
address = self.nodes[0].getnewaddress(label)
reward = Decimal("25")
- self.generatetoaddress(self.nodes[0], 1, address, sync_fun=self.no_op)
+ self.generatetoaddress(self.nodes[0], 1, address)
hash = self.nodes[0].getbestblockhash()
self.log.info("getreceivedbyaddress returns nothing with defaults")
@@ -212,7 +209,7 @@ class ReceivedByTest(BitcoinTestFramework):
{"label": label, "amount": reward})
self.log.info("Generate 100 more blocks")
- self.generate(self.nodes[0], COINBASE_MATURITY, sync_fun=self.no_op)
+ self.generate(self.nodes[0], COINBASE_MATURITY)
self.log.info("getreceivedbyaddress returns reward with defaults")
balance = self.nodes[0].getreceivedbyaddress(address)