@@ -64,14 +64,11 @@ static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
64
64
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336 ;
65
65
/* * The maximum size of a blk?????.dat file (since 0.8) */
66
66
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000 ; // 128 MiB
67
-
68
67
/* * Maximum number of dedicated script-checking threads allowed */
69
68
static const int MAX_SCRIPTCHECK_THREADS = 15 ;
70
69
/* * -par default (number of script-checking threads, 0 = auto) */
71
70
static const int DEFAULT_SCRIPTCHECK_THREADS = 0 ;
72
-
73
71
static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60 ;
74
-
75
72
static const bool DEFAULT_CHECKPOINTS_ENABLED = true ;
76
73
static const bool DEFAULT_TXINDEX = false ;
77
74
static const char * const DEFAULT_BLOCKFILTERINDEX = " 0" ;
@@ -80,9 +77,21 @@ static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
80
77
static const bool DEFAULT_PERSIST_MEMPOOL = true ;
81
78
/* * Default for using fee filter */
82
79
static const bool DEFAULT_FEEFILTER = true ;
83
-
84
80
/* * Default for -stopatheight */
85
81
static const int DEFAULT_STOPATHEIGHT = 0 ;
82
+ /* * Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ::ChainActive().Tip() will not be pruned. */
83
+ static const unsigned int MIN_BLOCKS_TO_KEEP = 288 ;
84
+ static const signed int DEFAULT_CHECKBLOCKS = 6 ;
85
+ static const unsigned int DEFAULT_CHECKLEVEL = 3 ;
86
+ // Require that user allocate at least 550 MiB for block & undo files (blk???.dat and rev???.dat)
87
+ // At 1MB per block, 288 blocks = 288MB.
88
+ // Add 15% for Undo data = 331MB
89
+ // Add 20% for Orphan block rate = 397MB
90
+ // We want the low water mark after pruning to be at least 397 MB and since we prune in
91
+ // full block file chunks, we need the high water mark which triggers the prune to be
92
+ // one 128MB block file + added 15% undo data = 147MB greater for a total of 545MB
93
+ // Setting the target to >= 550 MiB will make it likely we can respect the target.
94
+ static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024 ;
86
95
87
96
struct BlockHasher
88
97
{
@@ -130,21 +139,6 @@ extern bool fHavePruned;
130
139
extern bool fPruneMode ;
131
140
/* * Number of MiB of block files that we're trying to stay below. */
132
141
extern uint64_t nPruneTarget;
133
- /* * Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ::ChainActive().Tip() will not be pruned. */
134
- static const unsigned int MIN_BLOCKS_TO_KEEP = 288 ;
135
-
136
- static const signed int DEFAULT_CHECKBLOCKS = 6 ;
137
- static const unsigned int DEFAULT_CHECKLEVEL = 3 ;
138
-
139
- // Require that user allocate at least 550 MiB for block & undo files (blk???.dat and rev???.dat)
140
- // At 1MB per block, 288 blocks = 288MB.
141
- // Add 15% for Undo data = 331MB
142
- // Add 20% for Orphan block rate = 397MB
143
- // We want the low water mark after pruning to be at least 397 MB and since we prune in
144
- // full block file chunks, we need the high water mark which triggers the prune to be
145
- // one 128MB block file + added 15% undo data = 147MB greater for a total of 545MB
146
- // Setting the target to >= 550 MiB will make it likely we can respect the target.
147
- static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024 ;
148
142
149
143
/* *
150
144
* Process an incoming block. This only returns after the best known valid
0 commit comments