Skip to content

Commit e0680bb

Browse files
committed
Merge bitcoin/bitcoin#24806: RPC: Switch getblockfrompeer back to standard param name blockhash
88917f9 RPC: Switch getblockfrompeer back to standard param name blockhash (Luke Dashjr) Pull request description: This commit partially reverts 923312f. Portion of #24294. ACKs for top commit: MarcoFalke: review ACK 88917f9 ajtowns: ACK 88917f9 jonatack: Review-and-grep-only ACK 88917f9 Tree-SHA512: e42497ea6162623e449c5e60b83a5abbef568f226edc022aa14bbc1f1921618255d593968cf43f7a6d2c0bfd84cdd4b05fbce5c724759b20035e6eead758d443
2 parents c1059c9 + 88917f9 commit e0680bb

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)