Add psbt_version to PSBT RPCs and default to v2

walletcreatefundedpsbt, createpsbt, converttopsbt, and psbtbumpfee take
a psbt_version argument to set the version of the PSBT that they
produce. The default psbt_version is 2.
This commit is contained in:
Ava Chow
2024-07-22 17:14:50 -04:00
parent ab38c30195
commit bcc1dca77b
12 changed files with 171 additions and 88 deletions

View File

@@ -308,9 +308,9 @@ class SendallTest(BitcoinTestFramework):
decoded = self.nodes[0].decodepsbt(psbt)
assert_equal(len(decoded["inputs"]), 1)
assert_equal(len(decoded["outputs"]), 1)
assert_equal(decoded["tx"]["vin"][0]["txid"], utxo["txid"])
assert_equal(decoded["tx"]["vin"][0]["vout"], utxo["vout"])
assert_equal(decoded["tx"]["vout"][0]["scriptPubKey"]["address"], self.remainder_target)
assert_equal(decoded["inputs"][0]["previous_txid"], utxo["txid"])
assert_equal(decoded["inputs"][0]["previous_vout"], utxo["vout"])
assert_equal(decoded["outputs"][0]["script"]["address"], self.remainder_target)
@cleanup
def sendall_with_minconf(self):