From af34e980866e16970e0c4b837f56cd29038ae8bc Mon Sep 17 00:00:00 2001 From: Martin Zumsande Date: Thu, 17 Apr 2025 17:42:49 -0400 Subject: [PATCH] test: make rpc_psbt.py usable with --usecli The psbt string would include a "=" sign, which would make the cli interpret this as a named argument. Fix this by making it an actual named arg with the correct name. --- 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 9527053a6f7..236b05e26d4 100755 --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -72,7 +72,6 @@ class PSBTTest(BitcoinTestFramework): # whitelist peers to speed up tx relay / mempool sync for args in self.extra_args: args.append("-whitelist=noban@127.0.0.1") - self.supports_cli = False def skip_test_if_missing_module(self): self.skip_if_no_wallet() @@ -96,7 +95,7 @@ class PSBTTest(BitcoinTestFramework): signed_psbt_obj.g.map[PSBT_GLOBAL_UNSIGNED_TX] = bytes.fromhex(raw) # Check that the walletprocesspsbt call succeeds but also recognizes that the transaction is not complete - signed_psbt_incomplete = wallet.walletprocesspsbt(signed_psbt_obj.to_base64(), finalize=False) + signed_psbt_incomplete = wallet.walletprocesspsbt(psbt=signed_psbt_obj.to_base64(), finalize=False) assert signed_psbt_incomplete["complete"] is False def test_utxo_conversion(self): @@ -1209,7 +1208,8 @@ class PSBTTest(BitcoinTestFramework): self.log.info("Test descriptorprocesspsbt raises if an invalid sighashtype is passed") assert_raises_rpc_error(-8, "'all' is not a valid sighash parameter.", self.nodes[2].descriptorprocesspsbt, psbt, [descriptor], sighashtype="all") - self.test_sighash_mismatch() + if not self.options.usecli: + self.test_sighash_mismatch() self.test_sighash_adding() if __name__ == '__main__':