wrong sign in a comment

This commit is contained in:
KillariDev 2024-01-30 09:52:42 +02:00
parent eaac53ec38
commit d1f6993a12

View file

@ -83,7 +83,7 @@ func CalcBaseFee(config *params.ChainConfig, parent *types.Header) *big.Int {
return num.Add(parent.BaseFee, baseFeeDelta) return num.Add(parent.BaseFee, baseFeeDelta)
} else { } else {
// Otherwise if the parent block used less gas than its target, the baseFee should decrease. // Otherwise if the parent block used less gas than its target, the baseFee should decrease.
// max(0, parentBaseFee * gasUsedDelta / parentGasTarget / baseFeeChangeDenominator) // max(0, parentBaseFee * -gasUsedDelta / parentGasTarget / baseFeeChangeDenominator)
num.SetUint64(parentGasTarget - parent.GasUsed) num.SetUint64(parentGasTarget - parent.GasUsed)
num.Mul(num, parent.BaseFee) num.Mul(num, parent.BaseFee)
num.Div(num, denom.SetUint64(parentGasTarget)) num.Div(num, denom.SetUint64(parentGasTarget))