use of org.hyperledger.besu.ethereum.MainnetBlockValidator 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());
}
Aggregations