aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/mempool_options.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kernel/mempool_options.h b/src/kernel/mempool_options.h
index c3d54bf0f4..e8c129050e 100644
--- a/src/kernel/mempool_options.h
+++ b/src/kernel/mempool_options.h
@@ -4,8 +4,13 @@
#ifndef BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
#define BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
+#include <cstdint>
+
class CBlockPolicyEstimator;
+/** Default for -maxmempool, maximum megabytes of mempool memory usage */
+static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB{300};
+
namespace kernel {
/**
* Options struct containing options for constructing a CTxMemPool. Default
@@ -19,6 +24,7 @@ struct MemPoolOptions {
CBlockPolicyEstimator* estimator{nullptr};
/* The ratio used to determine how often sanity checks will run. */
int check_ratio{0};
+ int64_t max_size_bytes{DEFAULT_MAX_MEMPOOL_SIZE_MB * 1'000'000};
};
} // namespace kernel