public StateService(IOptions <DbSettings> dbOptions, IMainStatsState mainStats) { this.MainStats = mainStats; Stopwatch stopwatch = Stopwatch.StartNew(); this.db = StateOfNeoContext.Create(dbOptions.Value.DefaultConnection); this.Contracts = new ContractsState(); this.GetLatestTimestamp(); this.LoadTransactionTypes(); this.LoadLastActiveAddresses(); this.LoadLastTransactions(); this.LoadTransactionsMainChart(); this.LoadCreatedAddressesMainChart(); this.LoadActiveAddressesMainChart(); this.LoadBlockTimesMainChart(); this.LoadConsensusRewardsMainChart(); this.LoadBlockSizesMainChart(); stopwatch.Stop(); Log.Information($"{nameof(StateService)} initialization {stopwatch.ElapsedMilliseconds} ms"); }
public SearchService(StateOfNeoContext db, IMainStatsState mainStats) { this.db = db; this.mainStats = mainStats; }