diff options
author | fanquake <fanquake@gmail.com> | 2022-10-03 15:53:22 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-10-03 18:19:39 +0100 |
commit | 2bfc1e6aaaf8aa392f1f85050686ea6293aa817c (patch) | |
tree | 6c676caa65b81987d21c2a320e35d95dc37d85fa | |
parent | b92b12e8f3ea1e318e428e9c2ca0d529fd4452d2 (diff) | |
download | bitcoin-2bfc1e6aaaf8aa392f1f85050686ea6293aa817c.tar.xz |
refactor: move DEFAULT_TXINDEX from validation to txindex
-rw-r--r-- | src/index/txindex.h | 2 | ||||
-rw-r--r-- | src/node/caches.cpp | 2 | ||||
-rw-r--r-- | src/validation.h | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/index/txindex.h b/src/index/txindex.h index 8c1aa00033..4cea35045d 100644 --- a/src/index/txindex.h +++ b/src/index/txindex.h @@ -7,6 +7,8 @@ #include <index/base.h> +static constexpr bool DEFAULT_TXINDEX{false}; + /** * TxIndex is used to look up transactions included in the blockchain by hash. * The index is written to a LevelDB database and records the filesystem diff --git a/src/node/caches.cpp b/src/node/caches.cpp index f168332ee6..a39ad7aeb6 100644 --- a/src/node/caches.cpp +++ b/src/node/caches.cpp @@ -4,9 +4,9 @@ #include <node/caches.h> +#include <index/txindex.h> #include <txdb.h> #include <util/system.h> -#include <validation.h> namespace node { CacheSizes CalculateCacheSizes(const ArgsManager& args, size_t n_indexes) diff --git a/src/validation.h b/src/validation.h index 9ba206855f..7600956db9 100644 --- a/src/validation.h +++ b/src/validation.h @@ -65,7 +65,6 @@ static const int MAX_SCRIPTCHECK_THREADS = 15; static const int DEFAULT_SCRIPTCHECK_THREADS = 0; static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60; static const bool DEFAULT_CHECKPOINTS_ENABLED = true; -static const bool DEFAULT_TXINDEX = false; static constexpr bool DEFAULT_COINSTATSINDEX{false}; static const char* const DEFAULT_BLOCKFILTERINDEX = "0"; /** Default for -stopatheight */ |