public PowConsensusValidator(Network network) { Guard.NotNull(network, nameof(network)); Guard.NotNull(network.Consensus.Option <PowConsensusOptions>(), nameof(network.Consensus.Options)); this.consensusParams = network.Consensus; this.consensusOptions = network.Consensus.Option <PowConsensusOptions>(); this.PerformanceCounter = new ConsensusPerformanceCounter(); }
public PowConsensusValidator(Network network, ICheckpoints checkpoints, ILoggerFactory loggerFactory) { Guard.NotNull(network, nameof(network)); Guard.NotNull(network.Consensus.Option <PowConsensusOptions>(), nameof(network.Consensus.Options)); this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.consensusParams = network.Consensus; this.consensusOptions = network.Consensus.Option <PowConsensusOptions>(); this.PerformanceCounter = new ConsensusPerformanceCounter(); this.checkpoints = checkpoints; }