mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
wrong sign in a comment
This commit is contained in:
parent
eaac53ec38
commit
d1f6993a12
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue