From d1f6993a127d000b5981392a531b63c4975ad0f8 Mon Sep 17 00:00:00 2001 From: KillariDev Date: Tue, 30 Jan 2024 09:52:42 +0200 Subject: [PATCH] wrong sign in a comment --- consensus/misc/eip1559/eip1559.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/misc/eip1559/eip1559.go b/consensus/misc/eip1559/eip1559.go index 84b82c4c49..2312a2fe98 100644 --- a/consensus/misc/eip1559/eip1559.go +++ b/consensus/misc/eip1559/eip1559.go @@ -83,7 +83,7 @@ func CalcBaseFee(config *params.ChainConfig, parent *types.Header) *big.Int { return num.Add(parent.BaseFee, baseFeeDelta) } else { // 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.Mul(num, parent.BaseFee) num.Div(num, denom.SetUint64(parentGasTarget))