コード例 #1
0
        public PosConsensusValidator(StakeValidator stakeValidator, ICheckpoints checkpoints, Network network, StakeChain stakeChain, ConcurrentChain chain, CoinView coinView, IDateTimeProvider dateTimeProvider, ILoggerFactory loggerFactory)
            : base(network, checkpoints, dateTimeProvider, loggerFactory)
        {
            Guard.NotNull(network.Consensus.Option <PosConsensusOptions>(), nameof(network.Consensus.Options));

            this.logger           = loggerFactory.CreateLogger(this.GetType().FullName);
            this.stakeValidator   = stakeValidator;
            this.stakeChain       = stakeChain;
            this.chain            = chain;
            this.coinView         = coinView;
            this.consensusOptions = network.Consensus.Option <PosConsensusOptions>();
        }
コード例 #2
0
        public PosConsensusValidator(StakeValidator stakeValidator, Network network,
                                     StakeChain stakeChain, ConcurrentChain chain, CoinView coinView)
            : base(network)
        {
            Guard.NotNull(network.Consensus.Option <PosConsensusOptions>(), nameof(network.Consensus.Options));

            this.stakeValidator   = stakeValidator;
            this.stakeChain       = stakeChain;
            this.chain            = chain;
            this.coinView         = coinView;
            this.consensusOptions = network.Consensus.Option <PosConsensusOptions>();
        }