Changeset View
Changeset View
Standalone View
Standalone View
src/index/base.h
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | public: | ||||
/// Destructor interrupts sync thread if running and blocks until it exits. | /// Destructor interrupts sync thread if running and blocks until it exits. | ||||
virtual ~BaseIndex(); | virtual ~BaseIndex(); | ||||
/// Blocks the current thread until the index is caught up to the current | /// Blocks the current thread until the index is caught up to the current | ||||
/// state of the block chain. This only blocks if the index has gotten in | /// state of the block chain. This only blocks if the index has gotten in | ||||
/// sync once and only needs to process blocks in the ValidationInterface | /// sync once and only needs to process blocks in the ValidationInterface | ||||
/// queue. If the index is catching up from far behind, this method does | /// queue. If the index is catching up from far behind, this method does | ||||
/// not block and immediately returns false. | /// not block and immediately returns false. | ||||
bool BlockUntilSyncedToCurrentChain() const; | bool BlockUntilSyncedToCurrentChain() const LOCKS_EXCLUDED(::cs_main); | ||||
void Interrupt(); | void Interrupt(); | ||||
/// Start initializes the sync state and registers the instance as a | /// Start initializes the sync state and registers the instance as a | ||||
/// ValidationInterface so that it stays in sync with blockchain updates. | /// ValidationInterface so that it stays in sync with blockchain updates. | ||||
void Start(); | void Start(); | ||||
/// Stops the instance from staying in sync with blockchain updates. | /// Stops the instance from staying in sync with blockchain updates. | ||||
void Stop(); | void Stop(); | ||||
/// Get a summary of the index and its state. | /// Get a summary of the index and its state. | ||||
IndexSummary GetSummary() const; | IndexSummary GetSummary() const; | ||||
}; | }; | ||||
#endif // BITCOIN_INDEX_BASE_H | #endif // BITCOIN_INDEX_BASE_H |