Update time-based constants
This updated various time-based constants to more closely reflect values appropriate to Dogecoin: * Minimum number of blocks and blockchain size are increased for pruning. In comparison to Bitcoin this uses 24 hours as a minimum, rather than 48, although given blocks are rarely full this likely reflects a lot longer in reality.
This commit is contained in:
parent
d83eb4a722
commit
ca3a26df52
|
@ -197,20 +197,20 @@ extern bool fPruneMode;
|
|||
/** Number of MiB of block files that we're trying to stay below. */
|
||||
extern uint64_t nPruneTarget;
|
||||
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */
|
||||
static const unsigned int MIN_BLOCKS_TO_KEEP = 288;
|
||||
static const unsigned int MIN_BLOCKS_TO_KEEP = 1440;
|
||||
|
||||
static const signed int DEFAULT_CHECKBLOCKS = 6;
|
||||
static const unsigned int DEFAULT_CHECKLEVEL = 3;
|
||||
|
||||
// Require that user allocate at least 550MB for block & undo files (blk???.dat and rev???.dat)
|
||||
// At 1MB per block, 288 blocks = 288MB.
|
||||
// Add 15% for Undo data = 331MB
|
||||
// Add 20% for Orphan block rate = 397MB
|
||||
// We want the low water mark after pruning to be at least 397 MB and since we prune in
|
||||
// Require that user allocate at least 22,00MB for block & undo files (blk???.dat and rev???.dat)
|
||||
// At 1MB per block, 1,440 blocks = 1,440MB.
|
||||
// Add 15% for Undo data = 1,656MB
|
||||
// Add 20% for Orphan block rate = 1,987MB
|
||||
// We want the low water mark after pruning to be at least 1987 MB and since we 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 for a total of 545MB
|
||||
// Setting the target to > than 550MB will make it likely we can respect the target.
|
||||
static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024;
|
||||
// one 128MB block file + added 15% undo data = 147MB greater for a total of 2,134MB
|
||||
// Setting the target to > than 2200MB will make it likely we can respect the target.
|
||||
static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 2200ULL * 1024 * 1024;
|
||||
|
||||
/**
|
||||
* Process an incoming block. This only returns after the best known valid
|
||||
|
|
Loading…
Reference in a new issue