Search in sources :

Example 1 with BlockProcessor

use of org.hyperledger.besu.ethereum.mainnet.BlockProcessor in project besu by hyperledger.

the class NoRewardProtocolScheduleWrapper method getByBlockNumber.

@Override
public ProtocolSpec getByBlockNumber(final long number) {
    final ProtocolSpec original = delegate.getByBlockNumber(number);
    final BlockProcessor noRewardBlockProcessor = new MainnetBlockProcessor(original.getTransactionProcessor(), original.getTransactionReceiptFactory(), Wei.ZERO, original.getMiningBeneficiaryCalculator(), original.isSkipZeroBlockRewards(), Optional.empty());
    final BlockValidator noRewardBlockValidator = new MainnetBlockValidator(original.getBlockHeaderValidator(), original.getBlockBodyValidator(), noRewardBlockProcessor, original.getBadBlocksManager());
    final BlockImporter noRewardBlockImporter = new MainnetBlockImporter(noRewardBlockValidator);
    return new ProtocolSpec(original.getName(), original.getEvm(), original.getTransactionValidator(), original.getTransactionProcessor(), original.getPrivateTransactionProcessor(), original.getBlockHeaderValidator(), original.getOmmerHeaderValidator(), original.getBlockBodyValidator(), noRewardBlockProcessor, noRewardBlockImporter, noRewardBlockValidator, original.getBlockHeaderFunctions(), original.getTransactionReceiptFactory(), original.getDifficultyCalculator(), // block reward
    Wei.ZERO, original.getMiningBeneficiaryCalculator(), original.getPrecompileContractRegistry(), original.isSkipZeroBlockRewards(), original.getGasCalculator(), original.getGasLimitCalculator(), original.getFeeMarket(), original.getBadBlocksManager(), Optional.empty());
}
Also used : MainnetBlockProcessor(org.hyperledger.besu.ethereum.mainnet.MainnetBlockProcessor) MainnetBlockProcessor(org.hyperledger.besu.ethereum.mainnet.MainnetBlockProcessor) BlockProcessor(org.hyperledger.besu.ethereum.mainnet.BlockProcessor) MainnetBlockImporter(org.hyperledger.besu.ethereum.mainnet.MainnetBlockImporter) ProtocolSpec(org.hyperledger.besu.ethereum.mainnet.ProtocolSpec) MainnetBlockValidator(org.hyperledger.besu.ethereum.MainnetBlockValidator) BlockValidator(org.hyperledger.besu.ethereum.BlockValidator) MainnetBlockImporter(org.hyperledger.besu.ethereum.mainnet.MainnetBlockImporter) BlockImporter(org.hyperledger.besu.ethereum.core.BlockImporter) MainnetBlockValidator(org.hyperledger.besu.ethereum.MainnetBlockValidator)

Aggregations

BlockValidator (org.hyperledger.besu.ethereum.BlockValidator)1 MainnetBlockValidator (org.hyperledger.besu.ethereum.MainnetBlockValidator)1 BlockImporter (org.hyperledger.besu.ethereum.core.BlockImporter)1 BlockProcessor (org.hyperledger.besu.ethereum.mainnet.BlockProcessor)1 MainnetBlockImporter (org.hyperledger.besu.ethereum.mainnet.MainnetBlockImporter)1 MainnetBlockProcessor (org.hyperledger.besu.ethereum.mainnet.MainnetBlockProcessor)1 ProtocolSpec (org.hyperledger.besu.ethereum.mainnet.ProtocolSpec)1