Esempio n. 1
0
 public BlockScanJob(ILogger <BlockScanJob> logger, NexusQuery nexusQuery, BlockQuery blockQuery, BlockInsertCommand blockInsert,
                     AddressAggregatorCommand addressAggregator, BlockDeleteCommand blockDelete)
     : base(3, logger)
 {
     _nexusQuery        = nexusQuery;
     _blockQuery        = blockQuery;
     _blockInsert       = blockInsert;
     _addressAggregator = addressAggregator;
     _blockDelete       = blockDelete;
 }
Esempio n. 2
0
        public BlockSyncFixture()
        {
            var sc = new ServiceCollection();

            Settings.BuildConfig(sc);
            Settings.AttachConfig(sc.BuildServiceProvider(), true);

            var testDb = new NexusTestDesignTimeDbContextFactory().CreateDbContext(null);

            Client            = new NxsClient(Settings.Connection.Nexus);
            InsertCommand     = new BlockInsertCommand();
            DeleteCommand     = new BlockDeleteCommand();
            AddressAggregator = new AddressAggregatorCommand();
            Mapper            = new AutoMapperConfig().GetMapper();
            NexusQuery        = new NexusQuery(Client, Mapper);
            BlockQuery        = new BlockQuery(testDb, Mapper);
            AddressQuery      = new AddressQuery(testDb, null);
        }