Skip to content

Commit 7a799c9

Browse files
committed
index: refactor-only: Reuse CChain ref
1 parent db33cde commit 7a799c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index/base.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ bool BaseIndex::Init()
6060
}
6161

6262
LOCK(cs_main);
63+
CChain& active_chain = m_chainstate->m_chain;
6364
if (locator.IsNull()) {
6465
m_best_block_index = nullptr;
6566
} else {
66-
m_best_block_index = m_chainstate->m_blockman.FindForkInGlobalIndex(m_chainstate->m_chain, locator);
67+
m_best_block_index = m_chainstate->m_blockman.FindForkInGlobalIndex(active_chain, locator);
6768
}
68-
CChain& active_chain = m_chainstate->m_chain;
6969
m_synced = m_best_block_index.load() == active_chain.Tip();
7070
if (!m_synced) {
7171
bool prune_violation = false;

0 commit comments

Comments
 (0)