Bugfix: RPC/Blockchain: Correct getblocklocations return type

(array of objects, not array with named keys)
This commit is contained in:
Luke Dashjr 2023-07-27 00:29:33 +00:00
parent 63389a52a4
commit d71a059198

View File

@ -2883,10 +2883,13 @@ static RPCHelpMan getblocklocations()
RPCResult{
RPCResult::Type::ARR, "", "",
{
{RPCResult::Type::NUM, "file", "blk*.dat/rev*.dat file index"},
{RPCResult::Type::NUM, "data", "block data file offset"},
{RPCResult::Type::NUM, "undo", "undo data file offset (if exists)"},
{RPCResult::Type::STR_HEX, "prev", "previous block hash"},
{RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::NUM, "file", "blk*.dat/rev*.dat file index"},
{RPCResult::Type::NUM, "data", "block data file offset"},
{RPCResult::Type::NUM, "undo", /*optional=*/true, "undo data file offset (if exists)"},
{RPCResult::Type::STR_HEX, "prev", "previous block hash"},
}},
}
},
},