mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
eth: fix ethapi eth_feeHistory
This commit is contained in:
parent
cb21177aa8
commit
659347f886
1 changed files with 3 additions and 0 deletions
|
|
@ -108,6 +108,9 @@ func (oracle *Oracle) processBlock(bf *blockFees, percentiles []float64) {
|
||||||
bf.results.gasUsedRatio = float64(bf.header.GasUsed) / float64(bf.header.GasLimit)
|
bf.results.gasUsedRatio = float64(bf.header.GasUsed) / float64(bf.header.GasLimit)
|
||||||
if blobGasUsed := bf.header.BlobGasUsed; blobGasUsed != nil {
|
if blobGasUsed := bf.header.BlobGasUsed; blobGasUsed != nil {
|
||||||
maxBlobGas := eip4844.MaxBlobGasPerBlock(config, bf.header.Time)
|
maxBlobGas := eip4844.MaxBlobGasPerBlock(config, bf.header.Time)
|
||||||
|
if maxBlobGas == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
bf.results.blobGasUsedRatio = float64(*blobGasUsed) / float64(maxBlobGas)
|
bf.results.blobGasUsedRatio = float64(*blobGasUsed) / float64(maxBlobGas)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue