diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -9,3 +9,8 @@ The RPC `joinpsbts` will shuffle the order of the inputs and outputs of the resulting joined psbt. Previously inputs and outputs were added in the order that the PSBTs were provided which makes correlating inputs to outputs extremely easy. +The `utxoupdatepsbt` RPC method has been updated to take a `descriptors` +argument. When provided, input and output scripts and keys will be filled in +when known. + +See the RPC help text for full details. diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -27,6 +27,7 @@ {"mockscheduler", 0, "delta_time"}, {"generate", 0, "nblocks"}, {"generate", 1, "maxtries"}, + {"utxoupdatepsbt", 1, "descriptors"}, {"generatetoaddress", 0, "nblocks"}, {"generatetoaddress", 2, "maxtries"}, {"getnetworkhashps", 0, "nblocks"}, diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1984,7 +1984,7 @@ { "rawtransactions", "finalizepsbt", finalizepsbt, {"psbt", "extract"} }, { "rawtransactions", "createpsbt", createpsbt, {"inputs","outputs","locktime"} }, { "rawtransactions", "converttopsbt", converttopsbt, {"hexstring","permitsigdata"} }, - { "rawtransactions", "utxoupdatepsbt", utxoupdatepsbt, {"psbt"} }, + { "rawtransactions", "utxoupdatepsbt", utxoupdatepsbt, {"psbt", "descriptors"} }, { "rawtransactions", "joinpsbts", joinpsbts, {"txs"} }, { "rawtransactions", "analyzepsbt", analyzepsbt, {"psbt"} }, { "blockchain", "gettxoutproof", gettxoutproof, {"txids", "blockhash"} }, diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py --- a/test/functional/rpc_psbt.py +++ b/test/functional/rpc_psbt.py @@ -301,7 +301,7 @@ # Try again, now while providing descriptors descs = [self.nodes[1].getaddressinfo(addr)['desc'] for addr in [ addr1, addr2, addr3]] - updated = self.nodes[1].utxoupdatepsbt(psbt, descs) + updated = self.nodes[1].utxoupdatepsbt(psbt=psbt, descriptors=descs) decoded = self.nodes[1].decodepsbt(updated) test_psbt_input_keys(decoded['inputs'][1], [])