aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2022-01-28 17:14:29 +1000
committerAnthony Towns <aj@erisian.com.au>2022-01-28 18:07:08 +1000
commitfbab43f169924c681ef085639b3e4de6c74a4958 (patch)
treedb7289263def7965c123832ee3e5fa6453282f8c /src/rpc
parent5179656ef83a563133e32893f4acfd61d1aebdcb (diff)
downloadbitcoin-fbab43f169924c681ef085639b3e4de6c74a4958.tar.xz
rpc/blockchain: a constant craving
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index f68a3d2277..163f59300f 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1669,16 +1669,16 @@ static RPCHelpMan getdeploymentinfo()
RPCExamples{ HelpExampleCli("getdeploymentinfo", "") + HelpExampleRpc("getdeploymentinfo", "") },
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
- ChainstateManager& chainman = EnsureAnyChainman(request.context);
+ const ChainstateManager& chainman = EnsureAnyChainman(request.context);
LOCK(cs_main);
- CChainState& active_chainstate = chainman.ActiveChainstate();
+ const CChainState& active_chainstate = chainman.ActiveChainstate();
const CBlockIndex* tip;
if (request.params[0].isNull()) {
tip = active_chainstate.m_chain.Tip();
CHECK_NONFATAL(tip);
} else {
- uint256 hash(ParseHashV(request.params[0], "blockhash"));
+ const uint256 hash(ParseHashV(request.params[0], "blockhash"));
tip = chainman.m_blockman.LookupBlockIndex(hash);
if (!tip) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");