mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
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
This commit is contained in:
parent
9ee82d223e
commit
1d991ae96b
@ -777,7 +777,7 @@ static RPCHelpMan getblockfrompeer()
|
|||||||
"\nWe must have the header for this block, e.g. using submitheader.\n"
|
"\nWe must have the header for this block, e.g. using submitheader.\n"
|
||||||
"\nReturns {} if a block-request was successfully scheduled\n",
|
"\nReturns {} if a block-request was successfully scheduled\n",
|
||||||
{
|
{
|
||||||
{"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)"},
|
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
|
||||||
},
|
},
|
||||||
RPCResult{RPCResult::Type::OBJ, "", "",
|
RPCResult{RPCResult::Type::OBJ, "", "",
|
||||||
@ -794,7 +794,7 @@ static RPCHelpMan getblockfrompeer()
|
|||||||
ChainstateManager& chainman = EnsureChainman(node);
|
ChainstateManager& chainman = EnsureChainman(node);
|
||||||
PeerManager& peerman = EnsurePeerman(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 NodeId peer_id{request.params[1].get_int64()};
|
||||||
|
|
||||||
const CBlockIndex* const index = WITH_LOCK(cs_main, return chainman.m_blockman.LookupBlockIndex(block_hash););
|
const CBlockIndex* const index = WITH_LOCK(cs_main, return chainman.m_blockman.LookupBlockIndex(block_hash););
|
||||||
|
Loading…
Reference in New Issue
Block a user