aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2022-02-09 01:10:39 +0000
committerfanquake <fanquake@gmail.com>2022-04-08 13:27:19 +0100
commite3e4be9cd513c85311634a8128e018dbf8748888 (patch)
treeecf8ef81723fce3f17c696daed91995eac6dba65
parent69cc83df69e5a9306a0090df0dade38d5383af4d (diff)
downloadbitcoin-e3e4be9cd513c85311634a8128e018dbf8748888.tar.xz
RPC: Switch getblockfrompeer back to standard param name blockhash
This commit partially reverts 923312fbf6a89efde1739da0b7209694d4f892ba. Github-Pull: #24806 Rebased-From: 88917f93cc01b5e881072b0e476b74d20b7673c4
-rw-r--r--src/rpc/blockchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index ef572cf8f8..c066f6f569 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -795,7 +795,7 @@ static RPCHelpMan getblockfrompeer()
"Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n\n"
"Returns an empty JSON object if the request was successfully scheduled.",
{
- {"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
+ {"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
},
RPCResult{RPCResult::Type::OBJ, "", /*optional=*/false, "", {}},
@@ -809,7 +809,7 @@ static RPCHelpMan getblockfrompeer()
ChainstateManager& chainman = EnsureChainman(node);
PeerManager& peerman = EnsurePeerman(node);
- const uint256& block_hash{ParseHashV(request.params[0], "block_hash")};
+ const uint256& block_hash{ParseHashV(request.params[0], "blockhash")};
const NodeId peer_id{request.params[1].get_int64()};
const CBlockIndex* const index = WITH_LOCK(cs_main, return chainman.m_blockman.LookupBlockIndex(block_hash););