From a3fc66cec0de66b2f79cc7470431ea668863769c Mon Sep 17 00:00:00 2001 From: Rob Dawson Date: Mon, 8 Apr 2019 06:05:04 +1000 Subject: [PATCH] Variable name update. --- .../mainnet/MainnetProtocolSpecs.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetProtocolSpecs.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetProtocolSpecs.java index 310513be99..96f45d326b 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetProtocolSpecs.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetProtocolSpecs.java @@ -60,8 +60,9 @@ public abstract class MainnetProtocolSpecs { private MainnetProtocolSpecs() {} - public static ProtocolSpecBuilder frontierDefinition(final OptionalInt contractSizeLimit) { - int frontierContractSizeLimit = contractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT); + public static ProtocolSpecBuilder frontierDefinition( + final OptionalInt configContractSizeLimit) { + int contractSizeLimit = configContractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT); return new ProtocolSpecBuilder() .gasCalculator(FrontierGasCalculator::new) .evmBuilder(MainnetEvmRegistries::frontier) @@ -70,7 +71,7 @@ public static ProtocolSpecBuilder 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( @@ -110,15 +111,16 @@ public static ProtocolSpecBuilder frontierDefinition(final OptionalInt con .name("Frontier"); } - public static ProtocolSpecBuilder homesteadDefinition(final OptionalInt contractSizeLimit) { - int frontierContractSizeLimit = contractSizeLimit.orElse(FRONTIER_CONTRACT_SIZE_LIMIT); - return frontierDefinition(contractSizeLimit) + public static ProtocolSpecBuilder 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) @@ -158,9 +160,9 @@ public static ProtocolSpecBuilder tangerineWhistleDefinition( } public static ProtocolSpecBuilder 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( @@ -175,7 +177,7 @@ public static ProtocolSpecBuilder spuriousDragonDefinition( gasCalculator, evm, true, - spuriousDragonContractSizeLimit, + contractSizeLimit, 1, SPURIOUS_DRAGON_FORCE_DELETE_WHEN_EMPTY_ADDRESSES)) .transactionValidatorBuilder(