use of org.hyperledger.besu.ethereum.mainnet.ProtocolSpecBuilder in project besu by hyperledger.
the class BaseBftProtocolSchedule method createProtocolSchedule.
public ProtocolSchedule createProtocolSchedule(final GenesisConfigOptions config, final ForksSchedule<? extends BftConfigOptions> forksSchedule, final PrivacyParameters privacyParameters, final boolean isRevertReasonEnabled, final BftExtraDataCodec bftExtraDataCodec, final EvmConfiguration evmConfiguration) {
final Map<Long, Function<ProtocolSpecBuilder, ProtocolSpecBuilder>> specMap = new HashMap<>();
forksSchedule.getForks().forEach(forkSpec -> specMap.put(forkSpec.getBlock(), builder -> applyBftChanges(builder, forkSpec.getValue(), config.isQuorum(), bftExtraDataCodec)));
final ProtocolSpecAdapters specAdapters = new ProtocolSpecAdapters(specMap);
return new ProtocolScheduleBuilder(config, DEFAULT_CHAIN_ID, specAdapters, privacyParameters, isRevertReasonEnabled, config.isQuorum(), evmConfiguration).createProtocolSchedule();
}
Aggregations