Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 586 Lines • ▼ Show 20 Lines | public: | ||||
bool VerifyDB(CChainState &chainstate, const Config &config, | bool VerifyDB(CChainState &chainstate, const Config &config, | ||||
CCoinsView &coinsview, int nCheckLevel, int nCheckDepth) | CCoinsView &coinsview, int nCheckLevel, int nCheckDepth) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
}; | }; | ||||
/** @see CChainState::FlushStateToDisk */ | /** @see CChainState::FlushStateToDisk */ | ||||
enum class FlushStateMode { NONE, IF_NEEDED, PERIODIC, ALWAYS }; | enum class FlushStateMode { NONE, IF_NEEDED, PERIODIC, ALWAYS }; | ||||
/** Global variable that points to the active CCoinsView (protected by cs_main) | |||||
*/ | |||||
extern std::unique_ptr<CCoinsViewCache> pcoinsTip; | |||||
/** | /** | ||||
* A convenience class for constructing the CCoinsView* hierarchy used | * A convenience class for constructing the CCoinsView* hierarchy used | ||||
* to facilitate access to the UTXO set. | * to facilitate access to the UTXO set. | ||||
* | * | ||||
* This class consists of an arrangement of layered CCoinsView objects, | * This class consists of an arrangement of layered CCoinsView objects, | ||||
* preferring to store and retrieve coins in memory via `m_cacheview` but | * preferring to store and retrieve coins in memory via `m_cacheview` but | ||||
* ultimately falling back on cache misses to the canonical store of UTXOs on | * ultimately falling back on cache misses to the canonical store of UTXOs on | ||||
* disk, `m_dbview`. | * disk, `m_dbview`. | ||||
▲ Show 20 Lines • Show All 254 Lines • ▼ Show 20 Lines | DisconnectResult DisconnectBlock(const CBlock &block, | ||||
const CBlockIndex *pindex, | const CBlockIndex *pindex, | ||||
CCoinsViewCache &view) | CCoinsViewCache &view) | ||||
EXCLUSIVE_LOCKS_REQUIRED(::cs_main); | EXCLUSIVE_LOCKS_REQUIRED(::cs_main); | ||||
bool ConnectBlock(const CBlock &block, BlockValidationState &state, | bool ConnectBlock(const CBlock &block, BlockValidationState &state, | ||||
CBlockIndex *pindex, CCoinsViewCache &view, | CBlockIndex *pindex, CCoinsViewCache &view, | ||||
BlockValidationOptions options, bool fJustCheck = false) | BlockValidationOptions options, bool fJustCheck = false) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
// Block disconnection on our pcoinsTip: | // Apply the effects of a block disconnection on the UTXO set. | ||||
bool DisconnectTip(BlockValidationState &state, | bool DisconnectTip(BlockValidationState &state, | ||||
DisconnectedBlockTransactions *disconnectpool) | DisconnectedBlockTransactions *disconnectpool) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_mempool->cs); | EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_mempool->cs); | ||||
// Manual block validity manipulation: | // Manual block validity manipulation: | ||||
/** | /** | ||||
* Mark a block as precious and reorganize. | * Mark a block as precious and reorganize. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 445 Lines • Show Last 20 Lines |