From 6003cdea85d4b564340be339d60beb45d3bb9d8c Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sun, 26 Sep 2021 22:54:49 +0200 Subject: [PATCH] qa: reduce wallet config impact on importprunedfunds.py Changes client parametrization and mining frequency inside importprunedfunds.py to make sure that when wallet configuration changes, the test still can succeed, by not allowing it to respend unconfirmed outputs that could otherwise be reused in this test. The alternative would be to have to change this test every time the wallet defaults change, which is not the subject of this test. --- qa/rpc-tests/importprunedfunds.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qa/rpc-tests/importprunedfunds.py b/qa/rpc-tests/importprunedfunds.py index b289f9be5..c909d7164 100755 --- a/qa/rpc-tests/importprunedfunds.py +++ b/qa/rpc-tests/importprunedfunds.py @@ -15,7 +15,7 @@ class ImportPrunedFundsTest(BitcoinTestFramework): self.num_nodes = 2 def setup_network(self, split=False): - self.nodes = start_nodes(self.num_nodes, self.options.tmpdir) + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [['-spendzeroconfchange=0'], None]) connect_nodes_bi(self.nodes,0,1) self.is_network_split=False self.sync_all() @@ -25,7 +25,7 @@ class ImportPrunedFundsTest(BitcoinTestFramework): self.nodes[0].generate(101) self.sync_all() - + # address address1 = self.nodes[0].getnewaddress() # pubkey @@ -59,18 +59,18 @@ class ImportPrunedFundsTest(BitcoinTestFramework): #Send funds to self txnid1 = self.nodes[0].sendtoaddress(address1, 0.1) - self.nodes[0].generate(1) rawtxn1 = self.nodes[0].gettransaction(txnid1)['hex'] - proof1 = self.nodes[0].gettxoutproof([txnid1]) txnid2 = self.nodes[0].sendtoaddress(address2, 0.05) - self.nodes[0].generate(1) rawtxn2 = self.nodes[0].gettransaction(txnid2)['hex'] - proof2 = self.nodes[0].gettxoutproof([txnid2]) txnid3 = self.nodes[0].sendtoaddress(address3, 0.025) - self.nodes[0].generate(1) rawtxn3 = self.nodes[0].gettransaction(txnid3)['hex'] + + self.nodes[0].generate(1) + + proof1 = self.nodes[0].gettxoutproof([txnid1]) + proof2 = self.nodes[0].gettxoutproof([txnid2]) proof3 = self.nodes[0].gettxoutproof([txnid3]) self.sync_all()