Skip to content

Commit c1acd34

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25476: test: Remove unnecessary mining from importdescriptors test
e3d8d72 test: Remove unnecessary block mining from importdescriptors test (Fabian Jahr) Pull request description: This removes generation of 6 blocks and replaces is with a `sync_all` in the `importdescriptors` test. The generated blocks themself don't seem to serve any purpose in the test. Instead they could make the test flaky (although I did not find open issues pointing to this happening in practice in the CI). Right before the blocks being generated a transaction is created (L454) and later in the test this tx is assumed to be still in the mempool. If the nodes were to sync their mempools before the blocks are generated, the test fails. It currently only seems to work because one node sends the tx while the other generates the blocks and the mempools are not synced fast enough. The `sync_all` is still needed to let nodes catch up at that point. Otherwise races happen further below which the generate call seems to have prevented so far. ACKs for top commit: laanwj: Code review ACK e3d8d72 Tree-SHA512: 14f3dc2938d779d1ad43e09a7e046523fc3c92f41df012833f279a2e88e74c2fcab301fe4f3fcc038bd8460ea1360725a8d1eb5b59acd1039495bacb484fd790
2 parents fe5911e + e3d8d72 commit c1acd34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/wallet_importdescriptors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def run_test(self):
454454
send_txid = wmulti_priv.sendtoaddress(w0.getnewaddress(), 8)
455455
decoded = wmulti_priv.gettransaction(txid=send_txid, verbose=True)['decoded']
456456
assert_equal(len(decoded['vin'][0]['txinwitness']), 4)
457-
self.generate(self.nodes[0], 6)
457+
self.sync_all()
458458

459459
self.nodes[1].createwallet(wallet_name="wmulti_pub", disable_private_keys=True, blank=True, descriptors=True)
460460
wmulti_pub = self.nodes[1].get_wallet_rpc("wmulti_pub")

0 commit comments

Comments
 (0)