Changeset View
Changeset View
Standalone View
Standalone View
src/index/base.cpp
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | void BaseIndex::ChainStateFlushed(const CBlockLocator &locator) { | ||||
// No need to handle errors in Commit. If it fails, the error will be | // No need to handle errors in Commit. If it fails, the error will be | ||||
// already be logged. The best way to recover is to continue, as index | // already be logged. The best way to recover is to continue, as index | ||||
// cannot be corrupted by a missed commit to disk for an advanced index | // cannot be corrupted by a missed commit to disk for an advanced index | ||||
// state. | // state. | ||||
Commit(); | Commit(); | ||||
} | } | ||||
bool BaseIndex::BlockUntilSyncedToCurrentChain() { | bool BaseIndex::BlockUntilSyncedToCurrentChain() const { | ||||
AssertLockNotHeld(cs_main); | AssertLockNotHeld(cs_main); | ||||
if (!m_synced) { | if (!m_synced) { | ||||
return false; | return false; | ||||
} | } | ||||
{ | { | ||||
// Skip the queue-draining stuff if we know we're caught up with | // Skip the queue-draining stuff if we know we're caught up with | ||||
Show All 39 Lines |