From 358ae3283dc5ae3c8351871541742034905bd4fd Mon Sep 17 00:00:00 2001 From: pasta Date: Sun, 17 Dec 2023 14:10:16 -0600 Subject: [PATCH] refactor: add some const --- src/llmq/chainlocks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llmq/chainlocks.cpp b/src/llmq/chainlocks.cpp index 22294c107f..9e69f89b31 100644 --- a/src/llmq/chainlocks.cpp +++ b/src/llmq/chainlocks.cpp @@ -135,7 +135,7 @@ PeerMsgRet CChainLocksHandler::ProcessNewChainLock(const NodeId from, const llmq return {}; } - CBlockIndex* pindex = WITH_LOCK(cs_main, return m_chainstate.m_blockman.LookupBlockIndex(clsig.getBlockHash())); + const CBlockIndex* pindex = WITH_LOCK(cs_main, return m_chainstate.m_blockman.LookupBlockIndex(clsig.getBlockHash())); { LOCK(cs); @@ -428,7 +428,7 @@ CChainLocksHandler::BlockTxs::mapped_type CChainLocksHandler::GetBlockTxs(const } ret = std::make_shared>(); - for (auto& tx : block.vtx) { + for (const auto& tx : block.vtx) { if (tx->IsCoinBase() || tx->vin.empty()) { continue; }