aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-03-24 12:10:01 +0000
committerfanquake <fanquake@gmail.com>2022-03-24 12:15:19 +0000
commite7b6272b305386a264adf2c04b7bebfb8499070f (patch)
tree84604e87ce33db667d5bf686d0fce657f518f1ad /src/rpc/rawtransaction.cpp
parent26d98d51f2cfc902df35f855590c052e16a5ce12 (diff)
parentfaf37c217a408114224f91b7ada3fb6ff29b0c0a (diff)
downloadbitcoin-e7b6272b305386a264adf2c04b7bebfb8499070f.tar.xz
Merge bitcoin/bitcoin#24636: rpc: Exclude descriptor when address is excluded
faf37c217a408114224f91b7ada3fb6ff29b0c0a rpc: Exclude descriptor when address is excluded (MarcoFalke) Pull request description: I don't think output descriptors should be used to describe redeem scripts and witness scripts. Fix this by excluding them when it doesn't make sense. This should only affect the `decodepsbt` RPC. Found by https://github.com/bitcoin/bitcoin/pull/23083 ACKs for top commit: achow101: ACK faf37c217a408114224f91b7ada3fb6ff29b0c0a jonatack: ACK faf37c217a408114224f91b7ada3fb6ff29b0c0a Tree-SHA512: ebd581ad639e70080e26028723fed287caa3fa4d7b836936645020d6cd9b7586585d7113b043442c444a9dc90c23b93efd7f8b8a7d6cf5db1e42137b67c497c3
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 148734f31a..8e60e82f35 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -971,6 +971,7 @@ static RPCHelpMan decodepsbt()
{RPCResult::Type::OBJ, "scriptPubKey", "",
{
{RPCResult::Type::STR, "asm", "The asm"},
+ {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
{RPCResult::Type::STR_HEX, "hex", "The hex"},
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},