Skip to content

Commit fbab43f

Browse files
committed
rpc/blockchain: a constant craving
1 parent 5179656 commit fbab43f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rpc/blockchain.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,16 +1669,16 @@ static RPCHelpMan getdeploymentinfo()
16691669
RPCExamples{ HelpExampleCli("getdeploymentinfo", "") + HelpExampleRpc("getdeploymentinfo", "") },
16701670
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
16711671
{
1672-
ChainstateManager& chainman = EnsureAnyChainman(request.context);
1672+
const ChainstateManager& chainman = EnsureAnyChainman(request.context);
16731673
LOCK(cs_main);
1674-
CChainState& active_chainstate = chainman.ActiveChainstate();
1674+
const CChainState& active_chainstate = chainman.ActiveChainstate();
16751675

16761676
const CBlockIndex* tip;
16771677
if (request.params[0].isNull()) {
16781678
tip = active_chainstate.m_chain.Tip();
16791679
CHECK_NONFATAL(tip);
16801680
} else {
1681-
uint256 hash(ParseHashV(request.params[0], "blockhash"));
1681+
const uint256 hash(ParseHashV(request.params[0], "blockhash"));
16821682
tip = chainman.m_blockman.LookupBlockIndex(hash);
16831683
if (!tip) {
16841684
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");

0 commit comments

Comments
 (0)