Skip to content

Commit 914c000

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#26235: refactor: move *index constants out of validation
7d14577 refactor: move DEFAULT_BLOCKFILTERINDEX from val to blockfilterindex (fanquake) c87d569 refactor: move DEFAULT_COINSTATSINDEX from validation to coinstatsindex (fanquake) 2bfc1e6 refactor: move DEFAULT_TXINDEX from validation to txindex (fanquake) Pull request description: Move `*index` default constants out of `validation.h`. ACKs for top commit: stickies-v: re-ACK 7d14577 aureleoules: ACK 7d14577 Tree-SHA512: 3021db1a63ceb714dee4b91f755d1fb9a6633adb6f1081e34e4179900e7543e3a7b06fe47507d580a3a2caf52f7ede784cb36716d521c76b0404bdc798f0186a
2 parents f65a2c6 + 7d14577 commit 914c000

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

src/index/blockfilterindex.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <index/base.h>
1313
#include <util/hasher.h>
1414

15+
static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
16+
1517
/** Interval between compact filter checkpoints. See BIP 157. */
1618
static constexpr int CFCHECKPT_INTERVAL = 1000;
1719

src/index/coinstatsindex.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace kernel {
1414
struct CCoinsStats;
1515
}
1616

17+
static constexpr bool DEFAULT_COINSTATSINDEX{false};
18+
1719
/**
1820
* CoinStatsIndex maintains statistics on the UTXO set.
1921
*/

src/index/txindex.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#include <index/base.h>
99

10+
static constexpr bool DEFAULT_TXINDEX{false};
11+
1012
/**
1113
* TxIndex is used to look up transactions included in the blockchain by hash.
1214
* The index is written to a LevelDB database and records the filesystem

src/node/caches.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
#include <node/caches.h>
66

7+
#include <index/txindex.h>
78
#include <txdb.h>
89
#include <util/system.h>
9-
#include <validation.h>
1010

1111
namespace node {
1212
CacheSizes CalculateCacheSizes(const ArgsManager& args, size_t n_indexes)

src/validation.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ static const int MAX_SCRIPTCHECK_THREADS = 15;
6565
static const int DEFAULT_SCRIPTCHECK_THREADS = 0;
6666
static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
6767
static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
68-
static const bool DEFAULT_TXINDEX = false;
69-
static constexpr bool DEFAULT_COINSTATSINDEX{false};
70-
static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
7168
/** Default for -stopatheight */
7269
static const int DEFAULT_STOPATHEIGHT = 0;
7370
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */

0 commit comments

Comments
 (0)