remove EIP1559 Gas budget calculator implementation (#2318)

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
pull/2333/head
matkt 4 years ago committed by GitHub
parent e53e5c8e85
commit 1cb9d2826c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/fees/TransactionGasBudgetCalculator.java
  2. 3
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java
  3. 3
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/fees/TransactionGasBudgetCalculatorTest.java

@ -29,10 +29,6 @@ public interface TransactionGasBudgetCalculator {
return gasBudgetCalculator((blockNumber, gasLimit, ignored) -> gasLimit);
}
static TransactionGasBudgetCalculator eip1559(final EIP1559 eip1559) {
return gasBudgetCalculator((blockNumber, gasLimit, transaction) -> gasLimit);
}
static TransactionGasBudgetCalculator gasBudgetCalculator(
final BlockGasLimitCalculator blockGasLimitCalculator) {
return (transaction, blockNumber, gasLimit, gasUsed) -> {

@ -30,7 +30,6 @@ import org.hyperledger.besu.ethereum.core.WorldState;
import org.hyperledger.besu.ethereum.core.WorldUpdater;
import org.hyperledger.besu.ethereum.core.fees.CoinbaseFeePriceCalculator;
import org.hyperledger.besu.ethereum.core.fees.EIP1559;
import org.hyperledger.besu.ethereum.core.fees.TransactionGasBudgetCalculator;
import org.hyperledger.besu.ethereum.core.fees.TransactionPriceCalculator;
import org.hyperledger.besu.ethereum.goquorum.GoQuorumBlockProcessor;
import org.hyperledger.besu.ethereum.goquorum.GoQuorumBlockValidator;
@ -507,7 +506,6 @@ public abstract class MainnetProtocolSpecs {
.name("Aleut")
.transactionPriceCalculator(transactionPriceCalculator.orElseThrow())
.eip1559(Optional.of(eip1559))
.gasBudgetCalculator(TransactionGasBudgetCalculator.eip1559(eip1559))
.blockHeaderValidatorBuilder(MainnetBlockHeaderValidator.createEip1559Validator(eip1559))
.ommerHeaderValidatorBuilder(
MainnetBlockHeaderValidator.createEip1559OmmerValidator(eip1559));
@ -576,7 +574,6 @@ public abstract class MainnetProtocolSpecs {
.transactionPriceCalculator(transactionPriceCalculator.orElseThrow())
.eip1559(Optional.of(eip1559))
.difficultyCalculator(MainnetDifficultyCalculators.LONDON)
.gasBudgetCalculator(TransactionGasBudgetCalculator.eip1559(eip1559))
.blockHeaderValidatorBuilder(MainnetBlockHeaderValidator.createEip1559Validator(eip1559))
.ommerHeaderValidatorBuilder(
MainnetBlockHeaderValidator.createEip1559OmmerValidator(eip1559))

@ -67,6 +67,9 @@ public class TransactionGasBudgetCalculatorTest {
{FRONTIER_CALCULATOR, false, 5L, 1L, 10L, 0L, true},
{FRONTIER_CALCULATOR, false, 11L, 1L, 10L, 0L, false},
{FRONTIER_CALCULATOR, false, 5L, 1L, 10L, 6L, false},
{FRONTIER_CALCULATOR, true, 5L, 1L, 10L, 0L, true},
{FRONTIER_CALCULATOR, true, 11L, 1L, 10L, 0L, false},
{FRONTIER_CALCULATOR, true, 5L, 1L, 10L, 6L, false},
});
}

Loading…
Cancel
Save