rpc: fix fields describtion in man in 'decodepsbt'
What changed, and why it matters
This commit corrects the help text for the decodepsbt RPC command. It changes the documented return type from an array of input indexes to a simple true/false flag, matching what the code actually returns. There is no code behavior change and no security impact.
No security action required. Treat as a normal documentation fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates the RPCHelpMan result description in src/rpc/rawtransaction.cpp for decodepsbt. It replaces the documented ‘sighash_single_indexes’ array (with child NUM entries) with a BOOL field named ‘has_sighash_single’. This is a documentation-only fix aligning the manual/help output with the actual RPC implementation. No functional code is modified.
Changed components
src/rpc/rawtransaction.cppdecodepsbt RPC help documentationInspect captured patch +1 / −3
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 2ea9c3e..bff3a83 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1155,9 +1155,7 @@ static RPCHelpMan decodepsbt()
{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::ARR, "sighash_single_indexes", /*optional=*/true, "The indexes which have SIGHASH_SINGLE signatures",
- {{RPCResult::Type::NUM, "", "Index of an input with a SIGHASH_SINGLE signature"}},
- },
+ {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 19/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.