Skip to content

Commit e3e4be9

Browse files
luke-jrfanquake
authored andcommitted
RPC: Switch getblockfrompeer back to standard param name blockhash
This commit partially reverts 923312f. Github-Pull: #24806 Rebased-From: 88917f9
1 parent 69cc83d commit e3e4be9

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
@@ -795,7 +795,7 @@ static RPCHelpMan getblockfrompeer()
795795
"Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n\n"
796796
"Returns an empty JSON object if the request was successfully scheduled.",
797797
{
798-
{"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
798+
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
799799
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
800800
},
801801
RPCResult{RPCResult::Type::OBJ, "", /*optional=*/false, "", {}},
@@ -809,7 +809,7 @@ static RPCHelpMan getblockfrompeer()
809809
ChainstateManager& chainman = EnsureChainman(node);
810810
PeerManager& peerman = EnsurePeerman(node);
811811

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

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

0 commit comments

Comments
 (0)