consensu/misc/eip4844: implement EIP-7918 adjustments to excess blobgas calculation

This commit is contained in:
Jared Wasinger 2025-05-02 19:10:39 +08:00
parent 701df4baad
commit 778d5ceea5

View file

@ -76,6 +76,9 @@ 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(big.NewInt(1), parent.Number), headTimestamp) {
return excessBlobGas / 3
}
return excessBlobGas - targetGas return excessBlobGas - targetGas
} }