fix(event-watcher): fetching blob base fee

This commit is contained in:
colinlyguo
2024-06-17 14:25:06 +08:00
parent 33016b1d5d
commit 70e1ab0971

View File

@@ -137,8 +137,9 @@ func (w *L1WatcherClient) FetchBlockHeader(blockHeight uint64) error {
}
var blobBaseFee uint64
if excess := block.ExcessBlobGas; excess != nil {
blobBaseFee = misc.CalcBlobFee(*excess).Uint64()
if block.ExcessBlobGas != nil && block.BlobGasUsed != nil {
parentExcessBlobGas := misc.CalcExcessBlobGas(*block.ExcessBlobGas, *block.BlobGasUsed)
blobBaseFee = misc.CalcBlobFee(parentExcessBlobGas).Uint64()
}
l1Block := orm.L1Block{