aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index/base.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index/base.cpp b/src/index/base.cpp
index 88a66cc0d5..3a61af28b7 100644
--- a/src/index/base.cpp
+++ b/src/index/base.cpp
@@ -60,12 +60,12 @@ bool BaseIndex::Init()
}
LOCK(cs_main);
+ CChain& active_chain = m_chainstate->m_chain;
if (locator.IsNull()) {
m_best_block_index = nullptr;
} else {
- m_best_block_index = m_chainstate->m_blockman.FindForkInGlobalIndex(m_chainstate->m_chain, locator);
+ m_best_block_index = m_chainstate->m_blockman.FindForkInGlobalIndex(active_chain, locator);
}
- CChain& active_chain = m_chainstate->m_chain;
m_synced = m_best_block_index.load() == active_chain.Tip();
if (!m_synced) {
bool prune_violation = false;