Skip to content

Commit 3b11420

Browse files
committed
[RPC] add new utxoupdatepsbt arguments to the CRPCCommand and CPRCConvertParam tables
The new `descriptors` argument needs to be added to the Command and ConvertParams tables to by usable as a named argument and by bitcoin-cli. Also update the test to use named arguments to test this.
1 parent 2f717fb commit 3b11420

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/rpc/client.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CRPCConvertParam
2828
static const CRPCConvertParam vRPCConvertParams[] =
2929
{
3030
{ "setmocktime", 0, "timestamp" },
31+
{ "utxoupdatepsbt", 1, "descriptors" },
3132
{ "generatetoaddress", 0, "nblocks" },
3233
{ "generatetoaddress", 2, "maxtries" },
3334
{ "getnetworkhashps", 0, "nblocks" },

src/rpc/rawtransaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ static const CRPCCommand commands[] =
17761776
{ "rawtransactions", "finalizepsbt", &finalizepsbt, {"psbt", "extract"} },
17771777
{ "rawtransactions", "createpsbt", &createpsbt, {"inputs","outputs","locktime","replaceable"} },
17781778
{ "rawtransactions", "converttopsbt", &converttopsbt, {"hexstring","permitsigdata","iswitness"} },
1779-
{ "rawtransactions", "utxoupdatepsbt", &utxoupdatepsbt, {"psbt"} },
1779+
{ "rawtransactions", "utxoupdatepsbt", &utxoupdatepsbt, {"psbt", "descriptors"} },
17801780
{ "rawtransactions", "joinpsbts", &joinpsbts, {"txs"} },
17811781
{ "rawtransactions", "analyzepsbt", &analyzepsbt, {"psbt"} },
17821782

test/functional/rpc_psbt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def test_psbt_input_keys(psbt_input, keys):
346346

347347
# Try again, now while providing descriptors, making P2SH-segwit work, and causing bip32_derivs and redeem_script to be filled in
348348
descs = [self.nodes[1].getaddressinfo(addr)['desc'] for addr in [addr1,addr2,addr3]]
349-
updated = self.nodes[1].utxoupdatepsbt(psbt, descs)
349+
updated = self.nodes[1].utxoupdatepsbt(psbt=psbt, descriptors=descs)
350350
decoded = self.nodes[1].decodepsbt(updated)
351351
test_psbt_input_keys(decoded['inputs'][0], ['witness_utxo', 'bip32_derivs'])
352352
test_psbt_input_keys(decoded['inputs'][1], [])

0 commit comments

Comments
 (0)