mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -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);
|
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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue