From f42285b8dd9686012baf80255b56b334b461427b Mon Sep 17 00:00:00 2001 From: meherett Date: Tue, 11 Jun 2024 23:12:06 +0300 Subject: [PATCH] Fix: rpc_psbt.py test --- test/functional/rpc_psbt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py index d259ac677c..6915dfff6f 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -817,7 +817,7 @@ def test_psbt_input_keys(psbt_input, keys): outputs={self.nodes[0].getnewaddress(): 15}, add_inputs=True, solving_data={"descriptors": [desc]}, ) - assert_equal(psbt2["fee"], psbt3["fee"]) + assert_approx(psbt2["fee"], psbt3["fee"]) # Import the external utxo descriptor so that we can sign for it from the test wallet if self.options.descriptors: @@ -831,7 +831,7 @@ def test_psbt_input_keys(psbt_input, keys): outputs={self.nodes[0].getnewaddress(): 15}, add_inputs=True, ) - assert_equal(psbt2["fee"], psbt3["fee"]) + assert_approx(psbt2["fee"], psbt3["fee"]) self.log.info("Test signing inputs that the wallet has keys for but is not watching the scripts") self.nodes[1].createwallet(wallet_name="scriptwatchonly", disable_private_keys=True) @@ -975,7 +975,7 @@ def test_psbt_input_keys(psbt_input, keys): self.sync_all() vout = find_output(self.nodes[0], txid, 1) - psbt = self.nodes[2].createpsbt([{"txid": txid, "vout": vout}], {self.nodes[0].getnewaddress(): 0.99999}) + psbt = self.nodes[2].createpsbt([{"txid": txid, "vout": vout}], {self.nodes[0].getnewaddress(): 0.9995}) decoded = self.nodes[2].decodepsbt(psbt) test_psbt_input_keys(decoded['inputs'][0], [])