예제 #1
0
        private void Initialize()
        {
            LoadTerminalBlock();
            LoadFinalizedBlockHash();
            _specProvider.UpdateMergeTransitionInfo(_firstPoSBlockNumber, _mergeConfig.TerminalTotalDifficultyParsed);
            LoadFinalTotalDifficulty();

            if (_terminalBlockNumber != null || _finalTotalDifficulty != null)
            {
                _hasEverReachedTerminalDifficulty = true;
            }

            if (_terminalBlockNumber == null)
            {
                _blockTree.NewHeadBlock += CheckIfTerminalBlockReached;
            }

            if (_logger.IsInfo)
            {
                _logger.Info($"Client started with TTD: {TerminalTotalDifficulty}, TTD reached: {_hasEverReachedTerminalDifficulty}, Terminal Block Number {_terminalBlockNumber}, FinalTotalDifficulty: {FinalTotalDifficulty}");
            }
        }
 public void UpdateMergeTransitionInfo(long?blockNumber, UInt256?terminalTotalDifficulty = null)
 {
     _specProvider.UpdateMergeTransitionInfo(blockNumber, terminalTotalDifficulty);
 }