Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
extern arith_uint256 nMinimumChainWork; | extern arith_uint256 nMinimumChainWork; | ||||
/** | /** | ||||
* Best header we've seen so far (used for getheaders queries' starting points). | * Best header we've seen so far (used for getheaders queries' starting points). | ||||
*/ | */ | ||||
extern CBlockIndex *pindexBestHeader; | extern CBlockIndex *pindexBestHeader; | ||||
/** Minimum disk space required - used in CheckDiskSpace() */ | |||||
static const uint64_t nMinDiskSpace = 52428800; | |||||
/** Pruning-related variables and constants */ | /** Pruning-related variables and constants */ | ||||
/** True if any block files have ever been pruned. */ | /** True if any block files have ever been pruned. */ | ||||
extern bool fHavePruned; | extern bool fHavePruned; | ||||
/** True if we're running in -prune mode. */ | /** True if we're running in -prune mode. */ | ||||
extern bool fPruneMode; | extern bool fPruneMode; | ||||
/** Number of MiB of block files that we're trying to stay below. */ | /** Number of MiB of block files that we're trying to stay below. */ | ||||
extern uint64_t nPruneTarget; | extern uint64_t nPruneTarget; | ||||
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of | /** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
bool ProcessNewBlockHeaders(const Config &config, | bool ProcessNewBlockHeaders(const Config &config, | ||||
const std::vector<CBlockHeader> &block, | const std::vector<CBlockHeader> &block, | ||||
CValidationState &state, | CValidationState &state, | ||||
const CBlockIndex **ppindex = nullptr, | const CBlockIndex **ppindex = nullptr, | ||||
CBlockHeader *first_invalid = nullptr); | CBlockHeader *first_invalid = nullptr); | ||||
/** | /** | ||||
* Check whether enough disk space is available for an incoming block. | |||||
*/ | |||||
bool CheckDiskSpace(uint64_t nAdditionalBytes = 0, bool blocks_dir = false); | |||||
/** | |||||
* Open a block file (blk?????.dat). | * Open a block file (blk?????.dat). | ||||
*/ | */ | ||||
FILE *OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false); | FILE *OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false); | ||||
/** | /** | ||||
* Translation to a filesystem path. | * Translation to a filesystem path. | ||||
*/ | */ | ||||
fs::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix); | fs::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix); | ||||
▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines |