Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | |||||
static const unsigned int MIN_BLOCKS_TO_KEEP = 288; | static const unsigned int MIN_BLOCKS_TO_KEEP = 288; | ||||
/** Minimum blocks required to signal NODE_NETWORK_LIMITED */ | /** Minimum blocks required to signal NODE_NETWORK_LIMITED */ | ||||
static const unsigned int NODE_NETWORK_LIMITED_MIN_BLOCKS = 288; | static const unsigned int NODE_NETWORK_LIMITED_MIN_BLOCKS = 288; | ||||
static const signed int DEFAULT_CHECKBLOCKS = 6; | static const signed int DEFAULT_CHECKBLOCKS = 6; | ||||
static const unsigned int DEFAULT_CHECKLEVEL = 3; | static const unsigned int DEFAULT_CHECKLEVEL = 3; | ||||
/** | /** | ||||
* Require that user allocate at least 550MB for block & undo files (blk???.dat | * Require that user allocate at least 550 MiB for block & undo files | ||||
* and rev???.dat) | * (blk???.dat and rev???.dat) | ||||
* At 1MB per block, 288 blocks = 288MB. | * At 1MB per block, 288 blocks = 288MB. | ||||
* Add 15% for Undo data = 331MB | * Add 15% for Undo data = 331MB | ||||
* Add 20% for Orphan block rate = 397MB | * Add 20% for Orphan block rate = 397MB | ||||
* We want the low water mark after pruning to be at least 397 MB and since we | * We want the low water mark after pruning to be at least 397 MB and since we | ||||
* prune in full block file chunks, we need the high water mark which triggers | * prune in full block file chunks, we need the high water mark which triggers | ||||
* the prune to be one 128MB block file + added 15% undo data = 147MB greater | * the prune to be one 128MB block file + added 15% undo data = 147MB greater | ||||
* for a total of 545MB. Setting the target to > than 550MB will make it likely | * for a total of 545MB | ||||
* we can respect the target. | * Setting the target to >= 550 MiB will make it likely we can respect the | ||||
* target. | |||||
*/ | */ | ||||
static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; | static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; | ||||
class BlockValidationOptions { | class BlockValidationOptions { | ||||
private: | private: | ||||
uint64_t excessiveBlockSize; | uint64_t excessiveBlockSize; | ||||
bool checkPoW : 1; | bool checkPoW : 1; | ||||
bool checkMerkleRoot : 1; | bool checkMerkleRoot : 1; | ||||
▲ Show 20 Lines • Show All 809 Lines • Show Last 20 Lines |