Skip to content

Commit aa30676

Browse files
committed
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.
1 parent 06b88ff commit aa30676

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/init.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ using node::CalculateCacheSizes;
109109
using node::ChainstateLoadVerifyError;
110110
using node::ChainstateLoadingError;
111111
using node::CleanupBlockRevFiles;
112+
using node::DEFAULT_PERSIST_MEMPOOL;
112113
using node::DEFAULT_PRINTPRIORITY;
113114
using node::DEFAULT_STOPAFTERBLOCKIMPORT;
114115
using node::LoadChainstate;

src/node/mempool_persist_args.h

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ class ArgsManager;
1111

1212
namespace node {
1313

14+
/**
15+
* Default for -persistmempool, indicating whether the node should attempt to
16+
* automatically load the mempool on start and save to disk on shutdown
17+
*/
18+
static constexpr bool DEFAULT_PERSIST_MEMPOOL{true};
19+
1420
bool ShouldPersistMempool(const ArgsManager& argsman);
1521
fs::path MempoolPath(const ArgsManager& argsman);
1622

src/validation.h

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
6868
static const bool DEFAULT_TXINDEX = false;
6969
static constexpr bool DEFAULT_COINSTATSINDEX{false};
7070
static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
71-
/** Default for -persistmempool */
72-
static const bool DEFAULT_PERSIST_MEMPOOL = true;
7371
/** Default for -stopatheight */
7472
static const int DEFAULT_STOPATHEIGHT = 0;
7573
/** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */

0 commit comments

Comments
 (0)