/// <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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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();
 }
Exemplo n.º 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();
 }
Exemplo n.º 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;
        }
Exemplo n.º 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();
        }