aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-04-08 13:43:09 +0100
committerfanquake <fanquake@gmail.com>2022-04-08 13:43:18 +0100
commite0680bbce8b89ad5de9d1b9f818b76df68d72696 (patch)
tree0677b5fbbcbe72be37275511c45489fdce719773 /src
parentc1059c9fef188e1d025458fdf33eb992af4376e2 (diff)
parent88917f93cc01b5e881072b0e476b74d20b7673c4 (diff)
downloadbitcoin-e0680bbce8b89ad5de9d1b9f818b76df68d72696.tar.xz
Merge bitcoin/bitcoin#24806: RPC: Switch getblockfrompeer back to standard param name blockhash
88917f93cc01b5e881072b0e476b74d20b7673c4 RPC: Switch getblockfrompeer back to standard param name blockhash (Luke Dashjr) Pull request description: This commit partially reverts 923312fbf6a89efde1739da0b7209694d4f892ba. Portion of #24294. ACKs for top commit: MarcoFalke: review ACK 88917f93cc01b5e881072b0e476b74d20b7673c4 ajtowns: ACK 88917f93cc01b5e881072b0e476b74d20b7673c4 jonatack: Review-and-grep-only ACK 88917f93cc01b5e881072b0e476b74d20b7673c4 Tree-SHA512: e42497ea6162623e449c5e60b83a5abbef568f226edc022aa14bbc1f1921618255d593968cf43f7a6d2c0bfd84cdd4b05fbce5c724759b20035e6eead758d443
Diffstat (limited to 'src')
-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 cf72af1012..a124e0267c 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -430,7 +430,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, "", {}},
@@ -444,7 +444,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););