mempool: Don't share mempool with dbcache in blocksonly

When -blockonly is set, reduce mempool size to 5MB unless -maxmempool
is also set.

See #9569
This commit is contained in:
willcl-ark
2022-11-08 13:52:49 +00:00
parent 8339f3cea8
commit 1134686ef9
2 changed files with 6 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ class CBlockPolicyEstimator;
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB{300};
//** Default for -maxmempool when blocksonly is set */
static constexpr unsigned int DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB{5};
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336};
/** Default for -mempoolfullrbf, if the transaction replaceability signaling is ignored */