diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-02-21 13:58:04 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-02-21 13:58:09 +0100 |
commit | 1337b93f50d9874fa3bce7c0b5bb141aad9b1c49 (patch) | |
tree | 960aecd8e31cbbfe56fb6851bc98181dcda40701 /src/rpc/blockchain.cpp | |
parent | 85ae549a46872323f20baf2cfd83422453648974 (diff) | |
parent | c821ab8be8dffb749853c05e05cb515c11e6328a (diff) | |
download | bitcoin-1337b93f50d9874fa3bce7c0b5bb141aad9b1c49.tar.xz |
Merge bitcoin/bitcoin#24339: rpc: Improve RPC help by explicitly mentioning output types
c821ab8be8dffb749853c05e05cb515c11e6328a Use `GetAllOutputTypes` in `getblock` RPC function (Kiminuo)
d970a85d335202cc85f6604f794c43af6645673f Move `GetAllOutputTypes` function from `rpc/rawtransaction.cpp` to `rpc/util.{h|cpp}` (Kiminuo)
Pull request description:
This PR attempts to replicate https://github.com/bitcoin/bitcoin/blob/0ccf9b2e5594581deef2f60174c3651a57f93b64/src/rpc/rawtransaction.cpp#L547 to one other place (at the moment) so that users have better idea what RPC methods can actually return.
I created this PR as a follow-up to the idea mentioned here https://github.com/bitcoin/bitcoin/pull/23320#discussion_r732458112 (resolved).
ACKs for top commit:
kristapsk:
re-ACK c821ab8be8dffb749853c05e05cb515c11e6328a
Tree-SHA512: 5ff66a41ad7c43ec769f4a99933d2d070feea7c617286d94b6f9bfa1a2547a42211915778210a89074ad4b14d99f34852cc6871efed5e6f1e2ffedd40d669386
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r-- | src/rpc/blockchain.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index e5ad8f1a60..9817c80cbd 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1037,7 +1037,7 @@ static RPCHelpMan getblock() {RPCResult::Type::STR, "asm", "The asm"}, {RPCResult::Type::STR, "hex", "The hex"}, {RPCResult::Type::STR, "address", /* optional */ true, "The Bitcoin address (only if a well-defined address exists)"}, - {RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"}, + {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"}, }}, }}, }}, |