public ProofOfWorkCalculator(ILogger <ProofOfWorkCalculator> logger, IConsensusParameters consensusParameters, IBlockHeaderRepository blockHeaderRepository) { _logger = logger; _consensusParameters = consensusParameters; _blockHeaderRepository = blockHeaderRepository; }
public ChainState(ILogger <ChainState> logger, IHeadersTree headersTree, ICoinsView coinsView, IBlockHeaderRepository blockHeaderRepository, IConsensusParameters consensusParameters) { this.logger = logger; HeadersTree = headersTree; this.coinsView = coinsView; _blockHeaderRepository = blockHeaderRepository; _consensusParameters = consensusParameters; ChainTip = headersTree.Genesis; BestHeader = headersTree.Genesis; _blockHeaderRepository.TryAdd(consensusParameters.GenesisHeader); }
public HeaderMedianTimeCalculator(ILogger <HeaderMedianTimeCalculator> logger, IBlockHeaderRepository blockHeaderRepository) { _logger = logger; _blockHeaderRepository = blockHeaderRepository; }