コード例 #1
0
 /// <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="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="loggerFactory">Logger factory for creating instance logger.</param>
 public MempoolFeature(
     IConnectionManager connectionManager,
     Signals.Signals signals,
     MempoolSignaled mempoolSignaled,
     MempoolBehavior mempoolBehavior,
     MempoolManager mempoolManager,
     ILoggerFactory loggerFactory)
 {
     this.signals           = signals;
     this.connectionManager = connectionManager;
     this.mempoolSignaled   = mempoolSignaled;
     this.mempoolBehavior   = mempoolBehavior;
     this.mempoolManager    = mempoolManager;
     this.mempoolLogger     = loggerFactory.CreateLogger(this.GetType().FullName);
 }
コード例 #2
0
        /// <summary>
        /// Constructs a memory pool feature.
        /// </summary>
        /// <param name="connectionManager">Connection manager for managing node connections.</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="loggerFactory">Logger factory for creating instance logger.</param>
        public MempoolFeature(
            IConnectionManager connectionManager,
            MempoolSignaled mempoolSignaled,
            BlocksDisconnectedSignaled blocksDisconnectedSignaled,
            MempoolBehavior mempoolBehavior,
            MempoolManager mempoolManager,
            ILoggerFactory loggerFactory,
            INodeStats nodeStats)
        {
            this.connectionManager          = connectionManager;
            this.mempoolSignaled            = mempoolSignaled;
            this.blocksDisconnectedSignaled = blocksDisconnectedSignaled;
            this.mempoolBehavior            = mempoolBehavior;
            this.mempoolManager             = mempoolManager;
            this.logger = loggerFactory.CreateLogger(this.GetType().FullName);

            nodeStats.RegisterStats(this.AddComponentStats, StatsType.Component);
        }
コード例 #3
0
 /// <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)
 {
     this.signals                    = signals;
     this.connectionManager          = connectionManager;
     this.mempoolSignaled            = mempoolSignaled;
     this.blocksDisconnectedSignaled = blocksDisconnectedSignaled;
     this.mempoolBehavior            = mempoolBehavior;
     this.mempoolManager             = mempoolManager;
     this.mempoolLogger              = loggerFactory.CreateLogger(this.GetType().FullName);
     this.mempoolSettings            = mempoolSettings;
     this.nodeSettings               = nodeSettings;
 }