mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 04:12:36 -03:00
index: refactor-only: Reuse CChain ref
This commit is contained in:
parent
db33cde80f
commit
7a799c9c2b
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue