/// <summary>
 /// Initializes a new instance of the <see cref="BlockReorger"/> class.
 /// </summary>
 public BlockReorger(Tracer tracer, ISyncOperations syncOperations, SyncConnection syncConnection)
     : base(tracer)
 {
     this.connection = syncConnection;
     this.operations = syncOperations;
     this.tracer     = tracer;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockReorger"/> class.
 /// </summary>
 public BlockReorger(ILogger <BlockReorger> logger, ISyncOperations syncOperations, SyncConnection syncConnection)
     : base(logger)
 {
     connection = syncConnection;
     operations = syncOperations;
     log        = logger;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockSyncer"/> class.
 /// </summary>
 public BlockSyncer(NakoApplication application, NakoConfiguration config, ISyncOperations syncOperations, SyncConnection syncConnection, Tracer tracer)
     : base(application, config, tracer)
 {
     this.tracer         = tracer;
     this.syncConnection = syncConnection;
     this.syncOperations = syncOperations;
     this.config         = config;
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PoolFinder"/> class.
 /// </summary>
 public PoolFinder(IOptions <NakoConfiguration> configuration, ISyncOperations syncOperations, SyncConnection syncConnection, ILogger <PoolFinder> logger)
     : base(configuration, logger)
 {
     this.log            = logger;
     this.syncConnection = syncConnection;
     this.syncOperations = syncOperations;
     this.config         = configuration.Value;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockFinder"/> class.
 /// </summary>
 public BlockFinder(IOptions <IndexerSettings> configuration, ISyncOperations syncOperations, SyncConnection syncConnection, ILogger <BlockFinder> logger)
     : base(configuration, logger)
 {
     log = logger;
     this.syncConnection = syncConnection;
     this.syncOperations = syncOperations;
     config = configuration.Value;
     watch  = Stopwatch.Start();
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MempoolPuller"/> class.
 /// </summary>
 public MempoolPuller(
     IOptions <IndexerSettings> configuration,
     ISyncOperations syncOperations,
     SyncConnection syncConnection,
     ILogger <MempoolPuller> logger,
     IStorageOperations storageOperations)
     : base(configuration, logger)
 {
     log = logger;
     this.storageOperations = storageOperations;
     this.syncConnection    = syncConnection;
     this.syncOperations    = syncOperations;
     config = configuration.Value;
     watch  = Stopwatch.Start();
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockStore"/> class.
 /// </summary>
 public BlockStore(
     IOptions <IndexerSettings> configuration,
     ILogger <BlockStore> logger,
     IStorageOperations storageOperations,
     ISyncOperations syncOperations,
     SyncConnection syncConnection,
     IUtxoCache utxoCache)
     : base(configuration, logger)
 {
     this.storageOperations = storageOperations;
     this.syncOperations    = syncOperations;
     this.syncConnection    = syncConnection;
     this.utxoCache         = utxoCache;
     log   = logger;
     watch = Stopwatch.Start();
 }
예제 #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BlockStartup"/> class.
        /// </summary>
        public BlockStartup(
            ILogger <BlockStartup> logger,
            ISyncOperations syncOperations,
            SyncConnection syncConnection,
            IStorageOperations storageOperations,
            ICryptoClientFactory clientFactory,
            IStorage data)
            : base(logger)
        {
            connection             = syncConnection;
            this.storageOperations = storageOperations;
            this.clientFactory     = clientFactory;
            this.data           = data;
            this.syncOperations = syncOperations;
            log = logger;

            mongoData = (MongoData)data;
        }
예제 #9
0
        /// <summary>
        ///
        /// </summary>
        public StatsSyncer(
            IOptions <IndexerSettings> configuration,
            ISyncOperations syncOperations,
            IStorageOperations storageOperations,
            IStorage storage,
            SyncConnection syncConnection,
            StatsHandler statsHandler,
            ILogger <StatsSyncer> logger) : base(configuration, logger)
        {
            log = logger;

            data = (MongoData)storage;
            this.statsHandler      = statsHandler;
            this.storageOperations = storageOperations;

            // Only run the StatsSyncer every 5 minute.
            Delay = TimeSpan.FromMinutes(5);
            watch = Stopwatch.Start();
        }