Beispiel #1
0
        public void PostProcess(Block block, TxReceipt[] receipts, ProcessingOptions options = ProcessingOptions.None)
        {
            _currentValidator?.PostProcess(block, receipts, options);

            var notProducing = !options.IsProducingBlock();

            if (TryGetValidator(block.Number, out var validator))
            {
                if (validator.ValidatorType.CanChangeImmediately())
                {
                    SetCurrentValidator(block.Number, validator);
                    if (_logger.IsInfo && notProducing)
                    {
                        _logger.Info($"Immediately applying chainspec validator change signalled at block at block {block.ToString(Block.Format.Short)} to {validator.ValidatorType}.");
                    }
                }
                else if (_logger.IsInfo && notProducing)
                {
                    _logger.Info($"Signal for switch to chainspec {validator.ValidatorType} based validator set at block {block.ToString(Block.Format.Short)}.");
                }
            }

            _lastProcessedBlock = block.Number;
        }
Beispiel #2
0
 public void PostProcess(Block block, TxReceipt[] receipts)
 {
     _currentValidator?.PostProcess(block, receipts);
 }