Pass scheduler onto CTxMempool

This commit is contained in:
Luke Dashjr 2024-03-15 18:56:15 +00:00
parent 0d3fc9e513
commit 7d6aaa128e
2 changed files with 3 additions and 0 deletions

View File

@ -1546,6 +1546,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
CTxMemPool::Options mempool_opts{
.estimator = node.fee_estimator.get(),
.scheduler = &*node.scheduler,
.check_ratio = chainparams.DefaultConsistencyChecks() ? 1 : 0,
.signals = &validation_signals,
};

View File

@ -14,6 +14,7 @@
#include <optional>
class CBlockPolicyEstimator;
class CScheduler;
class ValidationSignals;
enum class RBFPolicy { Never, OptIn, Always };
@ -45,6 +46,7 @@ namespace kernel {
struct MemPoolOptions {
/* Used to estimate appropriate transaction fees. */
CBlockPolicyEstimator* estimator{nullptr};
CScheduler* scheduler{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};