From 7e8b5ee814b0b8c34acb20637ed4fc988ccba555 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 17 Mar 2021 16:58:57 -0400 Subject: validation: Make BlockManager::LookupBlockIndex const --- src/validation.cpp | 2 +- src/validation.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index d1b9efe7ba..b5c19971b4 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -169,7 +169,7 @@ namespace { std::set setDirtyFileInfo; } // anon namespace -CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash) +CBlockIndex* BlockManager::LookupBlockIndex(const uint256& hash) const { AssertLockHeld(cs_main); assert(std::addressof(g_chainman.BlockIndex()) == std::addressof(m_block_index)); diff --git a/src/validation.h b/src/validation.h index 2ff5f4ac87..21e63947fa 100644 --- a/src/validation.h +++ b/src/validation.h @@ -457,7 +457,7 @@ public: const CChainParams& chainparams, CBlockIndex** ppindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main); - CBlockIndex* LookupBlockIndex(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main); + CBlockIndex* LookupBlockIndex(const uint256& hash) const EXCLUSIVE_LOCKS_REQUIRED(cs_main); /** Find the last common block between the parameter chain and a locator. */ CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator) EXCLUSIVE_LOCKS_REQUIRED(cs_main); -- cgit v1.2.3