public BitcoinDWaiter( RPCClient rpc, ExplorerConfiguration configuration, NBXplorerNetwork network, SlimChain chain, Repository repository, AddressPoolService addressPoolService, EventAggregator eventAggregator) { if (addressPoolService == null) { throw new ArgumentNullException(nameof(addressPoolService)); } _OriginalRPC = rpc; _RPCWithTimeout = rpc.Clone(); _RPCWithTimeout.RequestTimeout = TimeSpan.FromMinutes(1.0); _Configuration = configuration; _Network = network; _Chain = chain; State = BitcoinDWaiterState.NotStarted; _EventAggregator = eventAggregator; _ChainConfiguration = _Configuration.ChainConfigurations.First(c => c.CryptoCode == _Network.CryptoCode); _ExplorerPrototype = new ExplorerBehavior(repository, chain, addressPoolService, eventAggregator) { StartHeight = _ChainConfiguration.StartHeight }; RPCReadyFile = Path.Combine(configuration.SignalFilesDir, $"{network.CryptoCode.ToLowerInvariant()}_fully_synched"); }