mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 04:00:01 +01:00
index: refactor-only: Reuse CChain ref
This commit is contained in:
@@ -60,12 +60,12 @@ bool BaseIndex::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
CChain& active_chain = m_chainstate->m_chain;
|
||||||
if (locator.IsNull()) {
|
if (locator.IsNull()) {
|
||||||
m_best_block_index = nullptr;
|
m_best_block_index = nullptr;
|
||||||
} else {
|
} 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();
|
m_synced = m_best_block_index.load() == active_chain.Tip();
|
||||||
if (!m_synced) {
|
if (!m_synced) {
|
||||||
bool prune_violation = false;
|
bool prune_violation = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user