diff options
author | Carl Dong <contact@carldong.me> | 2022-07-13 13:42:15 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-07-15 12:26:20 -0400 |
commit | aa306765419f7dbea12b12e15553039835ba0e4d (patch) | |
tree | 2d5dcfcc0e8746f7bfa07bb89b77251fab96e8c7 | |
parent | 06b88ffb8ae7f2b2a93a32908cd80e77fafd270c (diff) |
Move DEFAULT_PERSIST_MEMPOOL out of libbitcoinkernel
It is no longer used by anything inside libbitcoinkernel, move it to
node/mempool_persist_args.h where it belongs.
-rw-r--r-- | src/init.cpp | 1 | ||||
-rw-r--r-- | src/node/mempool_persist_args.h | 6 | ||||
-rw-r--r-- | src/validation.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 542b6f105f..c46205d583 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -109,6 +109,7 @@ using node::CalculateCacheSizes; using node::ChainstateLoadVerifyError; using node::ChainstateLoadingError; using node::CleanupBlockRevFiles; +using node::DEFAULT_PERSIST_MEMPOOL; using node::DEFAULT_PRINTPRIORITY; using node::DEFAULT_STOPAFTERBLOCKIMPORT; using node::LoadChainstate; diff --git a/src/node/mempool_persist_args.h b/src/node/mempool_persist_args.h index f2bfd2b748..f719ec62ab 100644 --- a/src/node/mempool_persist_args.h +++ b/src/node/mempool_persist_args.h @@ -11,6 +11,12 @@ class ArgsManager; namespace node { +/** + * Default for -persistmempool, indicating whether the node should attempt to + * automatically load the mempool on start and save to disk on shutdown + */ +static constexpr bool DEFAULT_PERSIST_MEMPOOL{true}; + bool ShouldPersistMempool(const ArgsManager& argsman); fs::path MempoolPath(const ArgsManager& argsman); diff --git a/src/validation.h b/src/validation.h index fad94af8e2..df4fc77980 100644 --- a/src/validation.h +++ b/src/validation.h @@ -68,8 +68,6 @@ 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 -persistmempool */ -static const bool DEFAULT_PERSIST_MEMPOOL = true; /** Default for -stopatheight */ static const int DEFAULT_STOPATHEIGHT = 0; /** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */ |