|
|
|
@ -18,26 +18,27 @@ public class FeeMarketConfig implements FeeMarket { |
|
|
|
|
private final long basefeeMaxChangeDenominator; |
|
|
|
|
private final long targetGasUsed; |
|
|
|
|
private final long decayRange; |
|
|
|
|
private final long gasIncrementAmount; |
|
|
|
|
private final long initialBasefee; |
|
|
|
|
private final long perTxGaslimit; |
|
|
|
|
private final long slackCoefficient; |
|
|
|
|
private final long maxGas; |
|
|
|
|
private final long gasIncrementAmount; |
|
|
|
|
|
|
|
|
|
public FeeMarketConfig( |
|
|
|
|
final long basefeeMaxChangeDenominator, |
|
|
|
|
final long targetGasUsed, |
|
|
|
|
final long slackCoefficient, |
|
|
|
|
final long decayRange, |
|
|
|
|
final long gasIncrementAmount, |
|
|
|
|
final long initialBasefee, |
|
|
|
|
final long perTxGaslimit) { |
|
|
|
|
this.basefeeMaxChangeDenominator = basefeeMaxChangeDenominator; |
|
|
|
|
this.targetGasUsed = targetGasUsed; |
|
|
|
|
this.slackCoefficient = slackCoefficient; |
|
|
|
|
this.decayRange = decayRange; |
|
|
|
|
this.gasIncrementAmount = gasIncrementAmount; |
|
|
|
|
this.initialBasefee = initialBasefee; |
|
|
|
|
this.perTxGaslimit = perTxGaslimit; |
|
|
|
|
this.maxGas = slackCoefficient * targetGasUsed; |
|
|
|
|
this.gasIncrementAmount = this.maxGas / 2 / this.decayRange; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -52,7 +53,7 @@ public class FeeMarketConfig implements FeeMarket { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public long getMaxGas() { |
|
|
|
|
return slackCoefficient * targetGasUsed; |
|
|
|
|
return maxGas; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|