Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Variable name update.
Browse files Browse the repository at this point in the history
  • Loading branch information
rojotek committed Apr 7, 2019
1 parent 2414e79 commit a3fc66c
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ public abstract class MainnetProtocolSpecs {

private MainnetProtocolSpecs() {}

public static ProtocolSpecBuilder<Void> frontierDefinition(final OptionalInt contractSizeLimit) {
int frontierContractSizeLimit = contractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT);
public static ProtocolSpecBuilder<Void> frontierDefinition(
final OptionalInt configContractSizeLimit) {
int contractSizeLimit = configContractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT);
return new ProtocolSpecBuilder<Void>()
.gasCalculator(FrontierGasCalculator::new)
.evmBuilder(MainnetEvmRegistries::frontier)
Expand All @@ -70,7 +71,7 @@ public static ProtocolSpecBuilder<Void> frontierDefinition(final OptionalInt con
.contractCreationProcessorBuilder(
(gasCalculator, evm) ->
new MainnetContractCreationProcessor(
gasCalculator, evm, false, frontierContractSizeLimit, 0))
gasCalculator, evm, false, contractSizeLimit, 0))
.transactionValidatorBuilder(
gasCalculator -> new MainnetTransactionValidator(gasCalculator, false))
.transactionProcessorBuilder(
Expand Down Expand Up @@ -110,15 +111,16 @@ public static ProtocolSpecBuilder<Void> frontierDefinition(final OptionalInt con
.name("Frontier");
}

public static ProtocolSpecBuilder<Void> homesteadDefinition(final OptionalInt contractSizeLimit) {
int frontierContractSizeLimit = contractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT);
return frontierDefinition(contractSizeLimit)
public static ProtocolSpecBuilder<Void> homesteadDefinition(
final OptionalInt configContractSizeLimit) {
int contractSizeLimit = configContractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT);
return frontierDefinition(configContractSizeLimit)
.gasCalculator(HomesteadGasCalculator::new)
.evmBuilder(MainnetEvmRegistries::homestead)
.contractCreationProcessorBuilder(
(gasCalculator, evm) ->
new MainnetContractCreationProcessor(
gasCalculator, evm, true, frontierContractSizeLimit, 0))
gasCalculator, evm, true, contractSizeLimit, 0))
.transactionValidatorBuilder(
gasCalculator -> new MainnetTransactionValidator(gasCalculator, true))
.difficultyCalculator(MainnetDifficultyCalculators.HOMESTEAD)
Expand Down Expand Up @@ -158,9 +160,9 @@ public static ProtocolSpecBuilder<Void> tangerineWhistleDefinition(
}

public static ProtocolSpecBuilder<Void> spuriousDragonDefinition(
final int chainId, final OptionalInt contractSizeLimit) {
final int spuriousDragonContractSizeLimit =
contractSizeLimit.orElse(SPURIOUS_DRAGON_CONTRACT_SIZE_LIMIT);
final int chainId, final OptionalInt configContractSizeLimit) {
final int contractSizeLimit =
configContractSizeLimit.orElse(SPURIOUS_DRAGON_CONTRACT_SIZE_LIMIT);
return tangerineWhistleDefinition(OptionalInt.empty())
.gasCalculator(SpuriousDragonGasCalculator::new)
.messageCallProcessorBuilder(
Expand All @@ -175,7 +177,7 @@ public static ProtocolSpecBuilder<Void> spuriousDragonDefinition(
gasCalculator,
evm,
true,
spuriousDragonContractSizeLimit,
contractSizeLimit,
1,
SPURIOUS_DRAGON_FORCE_DELETE_WHEN_EMPTY_ADDRESSES))
.transactionValidatorBuilder(
Expand Down

0 comments on commit a3fc66c

Please sign in to comment.