From 23af9aa151daab794a500792cd0c1fd9baf55d4d Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 29 Oct 2024 23:07:58 +0400 Subject: [PATCH] Fix wallet_conflicts.py --- test/functional/wallet_conflicts.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/test/functional/wallet_conflicts.py b/test/functional/wallet_conflicts.py index 802b718cd5..ba10bbf475 100755 --- a/test/functional/wallet_conflicts.py +++ b/test/functional/wallet_conflicts.py @@ -20,6 +20,11 @@ def add_options(self, parser): def set_test_params(self): self.num_nodes = 3 + self.extra_args = [ + ["-minrelaytxfee=0.00000001"], + ["-minrelaytxfee=0.00000001"], + ["-minrelaytxfee=0.00000001"], + ] def skip_test_if_missing_module(self): self.skip_if_no_wallet() @@ -49,7 +54,7 @@ def run_test(self): # | tx2 | -----> | | | | # inputs_tx_AB_parent = [{"txid": txid_conflict_from_1, "vout": output_A}, {"txid": txid_conflict_from_2, "vout": output_B}] - tx_AB_parent = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_AB_parent, {self.nodes[0].getnewaddress(): Decimal("19.99998")})) + tx_AB_parent = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_AB_parent, {self.nodes[0].getnewaddress(): Decimal("19.98998")})) # Secondly, create two transactions: One consuming output_A, and another one consuming output_B # @@ -59,18 +64,18 @@ def run_test(self): # inputs_tx_A_1 = [{"txid": txid_conflict_from_1, "vout": output_A}] inputs_tx_B_1 = [{"txid": txid_conflict_from_2, "vout": output_B}] - tx_A_1 = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_A_1, {self.nodes[0].getnewaddress(): Decimal("9.99998")})) - tx_B_1 = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_B_1, {self.nodes[0].getnewaddress(): Decimal("9.99998")})) + tx_A_1 = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_A_1, {self.nodes[0].getnewaddress(): Decimal("9.98998")})) + tx_B_1 = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_B_1, {self.nodes[0].getnewaddress(): Decimal("9.98998")})) self.log.info("Broadcast conflicted transaction") txid_AB_parent = self.nodes[0].sendrawtransaction(tx_AB_parent["hex"]) self.generate(self.nodes[0], 1, sync_fun=self.no_op) # Now that 'AB_parent_tx' was broadcast, build 'Child_Tx' - output_c = self.get_utxo_of_value(from_tx_id=txid_AB_parent, search_value=19.99998) + output_c = self.get_utxo_of_value(from_tx_id=txid_AB_parent, search_value=19.98998) inputs_tx_C_child = [({"txid": txid_AB_parent, "vout": output_c})] - tx_C_child = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_C_child, {self.nodes[0].getnewaddress() : Decimal("19.99996")})) + tx_C_child = self.nodes[0].signrawtransactionwithwallet(self.nodes[0].createrawtransaction(inputs_tx_C_child, {self.nodes[0].getnewaddress() : Decimal("19.98996")})) tx_C_child_txid = self.nodes[0].sendrawtransaction(tx_C_child["hex"]) self.generate(self.nodes[0], 1, sync_fun=self.no_op) @@ -121,7 +126,7 @@ def run_test(self): self.sync_blocks() former_conflicted = self.nodes[0].gettransaction(txid_AB_parent) assert_equal(former_conflicted["confirmations"], 1) - assert_equal(former_conflicted["blockheight"], 217) + assert_equal(former_conflicted["blockheight"], 2117) if __name__ == '__main__': TxConflicts().main()