public MempoolBehavior(
            IMempoolValidator validator,
            MempoolManager mempoolManager,
            MempoolOrphans orphans,
            IConnectionManager connectionManager,
            IInitialBlockDownloadState initialBlockDownloadState,
            Signals.Signals signals,
            ILoggerFactory loggerFactory,
            Network network)
        {
            this.validator                 = validator;
            this.mempoolManager            = mempoolManager;
            this.orphans                   = orphans;
            this.connectionManager         = connectionManager;
            this.initialBlockDownloadState = initialBlockDownloadState;
            this.signals                   = signals;
            this.logger        = loggerFactory.CreateLogger(this.GetType().FullName);
            this.loggerFactory = loggerFactory;
            this.network       = network;

            this.lockObject           = new object();
            this.inventoryTxToSend    = new HashSet <uint256>();
            this.filterInventoryKnown = new HashSet <uint256>();
        }
        /// <summary>
        /// Constructs a memory pool feature.
        /// </summary>
        /// <param name="connectionManager">Connection manager for managing node connections.</param>
        /// <param name="signals">Node notifications available to subscribe to.</param>
        /// <param name="mempoolSignaled">Observes block signal notifications from signals.</param>
        /// <param name="blocksDisconnectedSignaled">Observes reorged headers signal notifications from signals.</param>
        /// <param name="mempoolBehavior">Memory pool node behavior for managing attached node messages.</param>
        /// <param name="mempoolManager">Memory pool manager for managing external access to memory pool.</param>
        /// <param name="nodeSettings">User defined node settings.</param>
        /// <param name="loggerFactory">Logger factory for creating instance logger.</param>
        /// <param name="mempoolSettings">Mempool settings.</param>
        public MempoolFeature(
            IConnectionManager connectionManager,
            Signals.Signals signals,
            MempoolSignaled mempoolSignaled,
            BlocksDisconnectedSignaled blocksDisconnectedSignaled,
            MempoolBehavior mempoolBehavior,
            MempoolManager mempoolManager,
            NodeSettings nodeSettings,
            ILoggerFactory loggerFactory,
            MempoolSettings mempoolSettings,
            INodeStats nodeStats)
        {
            this.signals                    = signals;
            this.connectionManager          = connectionManager;
            this.mempoolSignaled            = mempoolSignaled;
            this.blocksDisconnectedSignaled = blocksDisconnectedSignaled;
            this.mempoolBehavior            = mempoolBehavior;
            this.mempoolManager             = mempoolManager;
            this.logger          = loggerFactory.CreateLogger(this.GetType().FullName);
            this.mempoolSettings = mempoolSettings;
            this.nodeSettings    = nodeSettings;

            nodeStats.RegisterStats(this.AddComponentStats, StatsType.Component);
        }
        public MempoolController(MempoolManager mempoolManager) : base()
        {
            Guard.NotNull(mempoolManager, nameof(mempoolManager));

            this.MempoolManager = mempoolManager;
        }