mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-12 11:19:08 -05:00
Add RPC help for getblock verbosity level 3
This commit is contained in:
parent
1bdd5f6322
commit
059f88b6a9
1 changed files with 32 additions and 1 deletions
|
@ -943,7 +943,7 @@ static RPCHelpMan getblock()
|
||||||
"If verbosity is 3, returns an Object with information about block <hash> and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain).\n",
|
"If verbosity is 3, returns an Object with information about block <hash> and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain).\n",
|
||||||
{
|
{
|
||||||
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
||||||
{"verbosity|verbose", RPCArg::Type::NUM, RPCArg::Default{1}, "0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data"},
|
{"verbosity|verbose", RPCArg::Type::NUM, RPCArg::Default{1}, "0 for hex-encoded data, 1 for a JSON object, 2 for JSON object with transaction data, and 3 for JSON object with transaction data including prevout information for inputs"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
RPCResult{"for verbosity = 0",
|
RPCResult{"for verbosity = 0",
|
||||||
|
@ -985,6 +985,37 @@ static RPCHelpMan getblock()
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
|
RPCResult{"for verbosity = 3",
|
||||||
|
RPCResult::Type::OBJ, "", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::ELISION, "", "Same output as verbosity = 2"},
|
||||||
|
{RPCResult::Type::ARR, "tx", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::OBJ, "", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::ARR, "vin", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::OBJ, "", "",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::ELISION, "", "The same output as verbosity = 2"},
|
||||||
|
{RPCResult::Type::OBJ, "prevout", "(Only if undo information is available)",
|
||||||
|
{
|
||||||
|
{RPCResult::Type::BOOL, "generated", "Coinbase or not"},
|
||||||
|
{RPCResult::Type::NUM, "height", "The height of the prevout"},
|
||||||
|
{RPCResult::Type::NUM, "value", "The value in " + CURRENCY_UNIT},
|
||||||
|
{RPCResult::Type::OBJ, "scriptPubKey", "",
|
||||||
|
{
|
||||||
|
{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'"},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
},
|
},
|
||||||
RPCExamples{
|
RPCExamples{
|
||||||
HelpExampleCli("getblock", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
|
HelpExampleCli("getblock", "\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"")
|
||||||
|
|
Loading…
Add table
Reference in a new issue