style: Remove whitespace

Can be reviewed via --ignore-all-space
This commit is contained in:
MarcoFalke 2021-11-12 12:10:47 +01:00
parent f2074eeb2d
commit fab0d998f4
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -535,32 +535,33 @@ static std::string GetAllOutputTypes()
static RPCHelpMan decodescript() static RPCHelpMan decodescript()
{ {
return RPCHelpMan{"decodescript", return RPCHelpMan{
"\nDecode a hex-encoded script.\n", "decodescript",
{ "\nDecode a hex-encoded script.\n",
{"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded script"}, {
}, {"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded script"},
RPCResult{ },
RPCResult::Type::OBJ, "", "", RPCResult{
{ RPCResult::Type::OBJ, "", "",
{RPCResult::Type::STR, "asm", "Script public key"}, {
{RPCResult::Type::STR, "type", "The output type (e.g. "+GetAllOutputTypes()+")"}, {RPCResult::Type::STR, "asm", "Script public key"},
{RPCResult::Type::STR, "address", /* optional */ true, "The Bitcoin address (only if a well-defined address exists)"}, {RPCResult::Type::STR, "type", "The output type (e.g. " + GetAllOutputTypes() + ")"},
{RPCResult::Type::STR, "p2sh", /* optional */ true, "address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH)"}, {RPCResult::Type::STR, "address", /* optional */ true, "The Bitcoin address (only if a well-defined address exists)"},
{RPCResult::Type::OBJ, "segwit", /* optional */ true, "Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness)", {RPCResult::Type::STR, "p2sh", /* optional */ true, "address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH)"},
{ {RPCResult::Type::OBJ, "segwit", /* optional */ true, "Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness)",
{RPCResult::Type::STR, "asm", "String representation of the script public key"}, {
{RPCResult::Type::STR_HEX, "hex", "Hex string of the script public key"}, {RPCResult::Type::STR, "asm", "String representation of the script public key"},
{RPCResult::Type::STR, "type", "The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)"}, {RPCResult::Type::STR_HEX, "hex", "Hex string of the script public key"},
{RPCResult::Type::STR, "address", /* optional */ true, "The Bitcoin address (only if a well-defined address exists)"}, {RPCResult::Type::STR, "type", "The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)"},
{RPCResult::Type::STR, "p2sh-segwit", "address of the P2SH script wrapping this witness redeem script"}, {RPCResult::Type::STR, "address", /* optional */ true, "The Bitcoin address (only if a well-defined address exists)"},
}}, {RPCResult::Type::STR, "p2sh-segwit", "address of the P2SH script wrapping this witness redeem script"},
} }},
}, },
RPCExamples{ },
HelpExampleCli("decodescript", "\"hexstring\"") RPCExamples{
+ HelpExampleRpc("decodescript", "\"hexstring\"") HelpExampleCli("decodescript", "\"hexstring\"")
}, + HelpExampleRpc("decodescript", "\"hexstring\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{ {
RPCTypeCheck(request.params, {UniValue::VSTR}); RPCTypeCheck(request.params, {UniValue::VSTR});