Page MenuHomePhabricator

rpc: Clarify decodescript RPCResult doc
ClosedPublic

Authored by PiRK on Oct 26 2020, 07:05.

Details

Reviewers
Fabien
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC5160fed36608: rpc: Clarify decodescript RPCResult doc
Summary

Mention all output types.
Remove "hex" from output.
General formatting of the output: more whitespaces

Due to backports being done out of sequential order, commit fa3caa1666a9baa856e92398a890aaddbdd98f7c (use IsValidNumArgs over hardcoded check) is not relevant for us. See D6580.

This is a backport of Core PR15616

Test Plan
$ src/bitcoin-cli help decodescript
Result:
{
  "asm":"asm",          (string) Script public key
  "type":"type",        (string) The output type (e.g. nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata)
  "reqSigs": n,         (numeric) The required signatures
  "addresses": [        (json array of string)
     "address"          (string) bitcoin address
     ,...
  ],
  "p2sh":"str"          (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).
}

Diff Detail