aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-06-27 08:16:26 +0200
committerMacroFake <falke.marco@gmail.com>2022-06-27 08:16:28 +0200
commitc1acd3498492f5fde94e4e597074cede4ca36516 (patch)
treeda5fbd6de2e0f33fef41b73e566f63f2cb81fd83 /test
parentfe5911ee04b89d4b1c3f3f00ae89ca9e603028a2 (diff)
parente3d8d727031c93a68ef2e5e85c83f4718e4c209f (diff)
downloadbitcoin-c1acd3498492f5fde94e4e597074cede4ca36516.tar.xz
Merge bitcoin/bitcoin#25476: test: Remove unnecessary mining from importdescriptors test
e3d8d727031c93a68ef2e5e85c83f4718e4c209f 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 e3d8d727031c93a68ef2e5e85c83f4718e4c209f Tree-SHA512: 14f3dc2938d779d1ad43e09a7e046523fc3c92f41df012833f279a2e88e74c2fcab301fe4f3fcc038bd8460ea1360725a8d1eb5b59acd1039495bacb484fd790
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_importdescriptors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/wallet_importdescriptors.py b/test/functional/wallet_importdescriptors.py
index ac74ff2484..ff11f421a1 100755
--- a/test/functional/wallet_importdescriptors.py
+++ b/test/functional/wallet_importdescriptors.py
@@ -454,7 +454,7 @@ class ImportDescriptorsTest(BitcoinTestFramework):
send_txid = wmulti_priv.sendtoaddress(w0.getnewaddress(), 8)
decoded = wmulti_priv.gettransaction(txid=send_txid, verbose=True)['decoded']
assert_equal(len(decoded['vin'][0]['txinwitness']), 4)
- self.generate(self.nodes[0], 6)
+ self.sync_all()
self.nodes[1].createwallet(wallet_name="wmulti_pub", disable_private_keys=True, blank=True, descriptors=True)
wmulti_pub = self.nodes[1].get_wallet_rpc("wmulti_pub")