From 659347f886e63d2caf3a9484f422ee8f7e7ab164 Mon Sep 17 00:00:00 2001 From: Morty Date: Thu, 17 Apr 2025 16:53:59 +0800 Subject: [PATCH] eth: fix ethapi eth_feeHistory --- eth/gasprice/feehistory.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eth/gasprice/feehistory.go b/eth/gasprice/feehistory.go index 59830e9fe8..990ba09885 100644 --- a/eth/gasprice/feehistory.go +++ b/eth/gasprice/feehistory.go @@ -108,6 +108,9 @@ func (oracle *Oracle) processBlock(bf *blockFees, percentiles []float64) { bf.results.gasUsedRatio = float64(bf.header.GasUsed) / float64(bf.header.GasLimit) if blobGasUsed := bf.header.BlobGasUsed; blobGasUsed != nil { maxBlobGas := eip4844.MaxBlobGasPerBlock(config, bf.header.Time) + if maxBlobGas == 0 { + return + } bf.results.blobGasUsedRatio = float64(*blobGasUsed) / float64(maxBlobGas) }