Skip to content

Commit 7e8b5ee

Browse files
committed
validation: Make BlockManager::LookupBlockIndex const
1 parent 88aead2 commit 7e8b5ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ namespace {
169169
std::set<int> setDirtyFileInfo;
170170
} // anon namespace
171171

172-
CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash)
172+
CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash) const
173173
{
174174
AssertLockHeld(cs_main);
175175
assert(std::addressof(g_chainman.BlockIndex()) == std::addressof(m_block_index));

src/validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ class BlockManager
457457
const CChainParams& chainparams,
458458
CBlockIndex** ppindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
459459

460-
CBlockIndex* LookupBlockIndex(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
460+
CBlockIndex* LookupBlockIndex(const uint256& hash) const EXCLUSIVE_LOCKS_REQUIRED(cs_main);
461461

462462
/** Find the last common block between the parameter chain and a locator. */
463463
CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator) EXCLUSIVE_LOCKS_REQUIRED(cs_main);

0 commit comments

Comments
 (0)