mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix it
This commit is contained in:
parent
593fbee5cb
commit
fda7b5a7e8
1 changed files with 8 additions and 2 deletions
|
|
@ -76,9 +76,15 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim
|
||||||
if excessBlobGas < targetGas {
|
if excessBlobGas < targetGas {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
if config.IsOsaka(new(big.Int).Add(parent.Number, big.NewInt(1)), headTimestamp) {
|
|
||||||
|
isOsaka := config.IsOsaka(new(big.Int).Add(parent.Number, big.NewInt(1)), headTimestamp)
|
||||||
|
if isOsaka {
|
||||||
|
executionBaseFeePaid := new(big.Int).Mul(parent.BaseFee, big.NewInt(int64(params.TxGas)))
|
||||||
|
blobBaseFeePaid := new(big.Int).Mul(big.NewInt(int64(targetGas)), CalcBlobFee(config, parent))
|
||||||
|
if executionBaseFeePaid.Cmp(blobBaseFeePaid) > 0 {
|
||||||
return excessBlobGas / 3
|
return excessBlobGas / 3
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return excessBlobGas - targetGas
|
return excessBlobGas - targetGas
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue