/// <inheritdoc /> public override void Initialize() { base.Initialize(); this.consensus = this.Parent.Network.Consensus; var consensusRules = (PosConsensusRuleEngine)this.Parent; this.stakeValidator = consensusRules.StakeValidator; this.stakeChain = consensusRules.StakeChain; this.rewardValidator = consensusRules.RewardValidator; }
/// <summary> /// Initializes an instance of the object. /// </summary> public PosConsensusRuleEngine(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ChainIndexer chainIndexer, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView utxoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState, IInvalidBlockHashStore invalidBlockHashStore, INodeStats nodeStats, IRewindDataIndexCache rewindDataIndexCache, IAsyncProvider asyncProvider, IRewardValidator rewardValidator) : base(network, loggerFactory, dateTimeProvider, chainIndexer, nodeDeployments, consensusSettings, checkpoints, utxoSet, chainState, invalidBlockHashStore, nodeStats, asyncProvider) { this.StakeChain = stakeChain; this.StakeValidator = stakeValidator; this.RewindDataIndexCache = rewindDataIndexCache; this.RewardValidator = rewardValidator; }
public TestPosConsensusRules(Network network, ILoggerFactory loggerFactory, IDateTimeProvider dateTimeProvider, ChainIndexer chainIndexer, NodeDeployments nodeDeployments, ConsensusSettings consensusSettings, ICheckpoints checkpoints, ICoinView uxtoSet, IStakeChain stakeChain, IStakeValidator stakeValidator, IChainState chainState, IInvalidBlockHashStore invalidBlockHashStore, INodeStats nodeStats, IRewindDataIndexCache rewindDataIndexCache, IAsyncProvider asyncProvider, IRewardValidator rewardValidator) : base(network, loggerFactory, dateTimeProvider, chainIndexer, nodeDeployments, consensusSettings, checkpoints, uxtoSet, stakeChain, stakeValidator, chainState, invalidBlockHashStore, nodeStats, rewindDataIndexCache, asyncProvider, rewardValidator) { this.ruleRegistrationHelper = new RuleRegistrationHelper(); }