Skip to content

Commit 88917f9

Browse files
luke-jrfanquake
authored andcommitted
RPC: Switch getblockfrompeer back to standard param name blockhash
This commit partially reverts 923312f.
1 parent 38d3d0b commit 88917f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static RPCHelpMan getblockfrompeer()
430430
"Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n\n"
431431
"Returns an empty JSON object if the request was successfully scheduled.",
432432
{
433-
{"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
433+
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
434434
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
435435
},
436436
RPCResult{RPCResult::Type::OBJ, "", /*optional=*/false, "", {}},
@@ -444,7 +444,7 @@ static RPCHelpMan getblockfrompeer()
444444
ChainstateManager& chainman = EnsureChainman(node);
445445
PeerManager& peerman = EnsurePeerman(node);
446446

447-
const uint256& block_hash{ParseHashV(request.params[0], "block_hash")};
447+
const uint256& block_hash{ParseHashV(request.params[0], "blockhash")};
448448
const NodeId peer_id{request.params[1].get_int64()};
449449

450450
const CBlockIndex* const index = WITH_LOCK(cs_main, return chainman.m_blockman.LookupBlockIndex(block_hash););

0 commit comments

Comments
 (0)