Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | double GuessVerificationProgress(const ChainTxData &data, | ||||
const CBlockIndex *pindex); | const CBlockIndex *pindex); | ||||
/** | /** | ||||
* Calculate the amount of disk space the block & undo files currently use. | * Calculate the amount of disk space the block & undo files currently use. | ||||
*/ | */ | ||||
uint64_t CalculateCurrentUsage(); | uint64_t CalculateCurrentUsage(); | ||||
/** | /** | ||||
* Mark one block file as pruned. | |||||
*/ | |||||
void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
/** | |||||
* Actually unlink the specified files | * Actually unlink the specified files | ||||
*/ | */ | ||||
void UnlinkPrunedFiles(const std::set<int> &setFilesToPrune); | void UnlinkPrunedFiles(const std::set<int> &setFilesToPrune); | ||||
/** Prune block files up to a given height */ | /** Prune block files up to a given height */ | ||||
void PruneBlockFilesManual(int nManualPruneHeight); | void PruneBlockFilesManual(int nManualPruneHeight); | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 823 Lines • ▼ Show 20 Lines | public: | ||||
//! | //! | ||||
//! During background validation of a snapshot, this is the IBD chain. After | //! During background validation of a snapshot, this is the IBD chain. After | ||||
//! background validation has completed, this is the snapshot chain. | //! background validation has completed, this is the snapshot chain. | ||||
CChainState &ValidatedChainstate() const; | CChainState &ValidatedChainstate() const; | ||||
CChain &ValidatedChain() const { return ValidatedChainstate().m_chain; } | CChain &ValidatedChain() const { return ValidatedChainstate().m_chain; } | ||||
CBlockIndex *ValidatedTip() const { return ValidatedChain().Tip(); } | CBlockIndex *ValidatedTip() const { return ValidatedChain().Tip(); } | ||||
//! Mark one block file as pruned (modify associated database entries) | |||||
void PruneOneBlockFile(const int fileNumber) | |||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | |||||
//! Load the block tree and coins database from disk, initializing state if | //! Load the block tree and coins database from disk, initializing state if | ||||
//! we're running with -reindex | //! we're running with -reindex | ||||
bool LoadBlockIndex(const Consensus::Params ¶ms) | bool LoadBlockIndex(const Consensus::Params ¶ms) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
//! Unload block index and chain data before shutdown. | //! Unload block index and chain data before shutdown. | ||||
void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main); | void Unload() EXCLUSIVE_LOCKS_REQUIRED(::cs_main); | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |