Skip to content

Commit 7d049f1

Browse files
fanquakeknst
authored andcommitted
Merge 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 bitcoin#24294. ACKs for top commit: MarcoFalke: review ACK 88917f9 ajtowns: ACK 88917f9 jonatack: Review-and-grep-only ACK 88917f9 Tree-SHA512: e42497ea6162623e449c5e60b83a5abbef568f226edc022aa14bbc1f1921618255d593968cf43f7a6d2c0bfd84cdd4b05fbce5c724759b20035e6eead758d443
1 parent 68efe46 commit 7d049f1

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
@@ -478,7 +478,7 @@ static RPCHelpMan getblockfrompeer()
478478
"Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n"
479479
"\nReturns an empty JSON object if the request was successfully scheduled.",
480480
{
481-
{"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
481+
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
482482
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
483483
},
484484
RPCResult{RPCResult::Type::OBJ, "", /*optional=*/false, "", {}},
@@ -497,7 +497,7 @@ static RPCHelpMan getblockfrompeer()
497497
ChainstateManager& chainman = EnsureChainman(node);
498498
PeerManager& peerman = EnsurePeerman(node);
499499

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

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

0 commit comments

Comments
 (0)