Changeset View
Changeset View
Standalone View
Standalone View
src/index/base.cpp
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | if (locator.IsNull()) { | ||||
m_best_block_index = nullptr; | m_best_block_index = nullptr; | ||||
} else { | } else { | ||||
m_best_block_index = FindForkInGlobalIndex(chainActive, locator); | m_best_block_index = FindForkInGlobalIndex(chainActive, locator); | ||||
} | } | ||||
m_synced = m_best_block_index.load() == chainActive.Tip(); | m_synced = m_best_block_index.load() == chainActive.Tip(); | ||||
return true; | return true; | ||||
} | } | ||||
static const CBlockIndex *NextSyncBlock(const CBlockIndex *pindex_prev) { | static const CBlockIndex *NextSyncBlock(const CBlockIndex *pindex_prev) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | |||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
if (!pindex_prev) { | if (!pindex_prev) { | ||||
return chainActive.Genesis(); | return chainActive.Genesis(); | ||||
} | } | ||||
const CBlockIndex *pindex = chainActive.Next(pindex_prev); | const CBlockIndex *pindex = chainActive.Next(pindex_prev); | ||||
if (pindex) { | if (pindex) { | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |