Beispiel #1
0
 /// <summary>
 /// Constructs and instance of memory pool behavior.
 /// Constructs a logger instance for memory pool behavior object.
 /// </summary>
 /// <param name="validator">Memory pool validator for validating transactions.</param>
 /// <param name="manager">Memory pool manager for managing the memory pool.</param>
 /// <param name="orphans">Memory pool orphans for managing orphan transactions.</param>
 /// <param name="connectionManager">Connection manager for managing node connections.</param>
 /// <param name="initialBlockDownloadState">Provider of IBD state.</param>
 /// <param name="signals">Node notifications available to subscribe to.</param>
 /// <param name="loggerFactory">Logger factory for creating logger.</param>
 public MempoolBehavior(
     IMempoolValidator validator,
     MempoolManager manager,
     MempoolOrphans orphans,
     IConnectionManager connectionManager,
     IInitialBlockDownloadState initialBlockDownloadState,
     Signals.Signals signals,
     ILoggerFactory loggerFactory)
     : this(validator, manager, orphans, connectionManager, initialBlockDownloadState, signals, loggerFactory.CreateLogger(typeof(MempoolBehavior).FullName))
 {
 }
Beispiel #2
0
        /// <summary>
        /// Constructs an instance of memory pool behavior.
        /// </summary>
        /// <param name="validator">Memory pool validator for validating transactions.</param>
        /// <param name="manager">Memory pool manager for managing the memory pool.</param>
        /// <param name="orphans">Memory pool orphans for managing orphan transactions.</param>
        /// <param name="connectionManager">Connection manager for managing node connections.</param>
        /// <param name="initialBlockDownloadState">Provider of IBD state.</param>
        /// <param name="signals">Node notifications available to subscribe to.</param>
        /// <param name="logger">Instance logger for memory pool behavior.</param>
        public MempoolBehavior(
            IMempoolValidator validator,
            MempoolManager manager,
            MempoolOrphans orphans,
            IConnectionManager connectionManager,
            IInitialBlockDownloadState initialBlockDownloadState,
            Signals.Signals signals,
            ILogger logger)
        {
            this.validator                 = validator;
            this.manager                   = manager;
            this.orphans                   = orphans;
            this.connectionManager         = connectionManager;
            this.initialBlockDownloadState = initialBlockDownloadState;
            this.signals                   = signals;
            this.logger = logger;

            this.inventoryTxToSend    = new Dictionary <uint256, uint256>();
            this.filterInventoryKnown = new Dictionary <uint256, uint256>();
        }
Beispiel #3
0
 /// <summary>
 /// Constructs an instance of a memory pool manager object.
 /// </summary>
 /// <param name="mempoolLock">A lock for managing asynchronous access to memory pool.</param>
 /// <param name="memPool">Transaction memory pool for managing transactions in the memory pool.</param>
 /// <param name="validator">Memory pool validator for validating transactions.</param>
 /// <param name="orphans">Memory pool orphans for managing orphan transactions.</param>
 /// <param name="dateTimeProvider">Date and time information provider.</param>
 /// <param name="mempoolSettings">Settings for memory pool.</param>
 /// <param name="mempoolPersistence">Memory pool persistence methods for loading and saving from storage.</param>
 /// <param name="coinView">Coin view of the memory pool.</param>
 /// <param name="loggerFactory">Logger factory for creating instance logger.</param>
 public MempoolManager(
     MempoolSchedulerLock mempoolLock,
     TxMempool memPool,
     IMempoolValidator validator,
     MempoolOrphans orphans,
     IDateTimeProvider dateTimeProvider,
     MempoolSettings mempoolSettings,
     IMempoolPersistence mempoolPersistence,
     CoinView coinView,
     ILoggerFactory loggerFactory)
 {
     this.MempoolLock        = mempoolLock;
     this.memPool            = memPool;
     this.DateTimeProvider   = dateTimeProvider;
     this.mempoolSettings    = mempoolSettings;
     this.Orphans            = orphans;
     this.Validator          = validator;
     this.mempoolPersistence = mempoolPersistence;
     this.coinView           = coinView;
     this.mempoolLogger      = loggerFactory.CreateLogger(this.GetType().FullName);
 }