rpc: fix fields type in man in 'decodepsbt'
What changed, and why it matters
This commit corrects a documentation-only error in the help text for the 'decodepsbt' RPC command. The two fields 'inputs_modifiable' and 'outputs_modifiable' were incorrectly listed as numeric (NUM) types when they are actually boolean (BOOL) values. No code behavior changes, so there is no security impact.
No security action required. Treat as a routine documentation fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/rpc/rawtransaction.cpp, the RPCHelpMan result schema for decodepsbt changes RPCResult::Type::NUM to RPCResult::Type::BOOL for the ‘inputs_modifiable’ and ‘outputs_modifiable’ optional fields. This is a metadata/documentation fix within the RPC help system and does not alter serialization, parsing, validation, or any runtime logic.
Changed components
src/rpc/rawtransaction.cppdecodepsbt RPC help metadataInspect captured patch +2 / −2
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index bff3a83..584bec3 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1153,8 +1153,8 @@ static RPCHelpMan decodepsbt()
{RPCResult::Type::NUM, "fees", "The fees specified in this psbt.", {}, /*skip_type_check=*/true}, // ELEMENTS has an explicit fee output, bitcoin does not (they are implicit)
{RPCResult::Type::NUM, "input_count", "The number of inputs in this psbt"},
{RPCResult::Type::NUM, "output_count", "The number of outputs in this psbt."},
- {RPCResult::Type::NUM, "inputs_modifiable", /*optional=*/true, "Whether inputs can be modified"},
- {RPCResult::Type::NUM, "outputs_modifiable", /*optional=*/true, "Whether outputs can be modified"},
+ {RPCResult::Type::BOOL, "inputs_modifiable", /*optional=*/true, "Whether inputs can be modified"},
+ {RPCResult::Type::BOOL, "outputs_modifiable", /*optional=*/true, "Whether outputs can be modified"},
{RPCResult::Type::BOOL, "has_sighash_single", /*optional=*/true, "Whether this PSBT has SIGHASH_SINGLE inputs"},
{RPCResult::Type::NUM, "psbt_version", "The PSBT version number. Not to be confused with the unsigned transaction version"},
{RPCResult::Type::ARR, "scalar_offsets", /*optional=*/true, "The PSET scalar elements",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.