mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
eth: fix ethapi eth_feeHistory
This commit is contained in:
parent
659347f886
commit
234002a428
1 changed files with 2 additions and 3 deletions
|
|
@ -108,10 +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 {
|
if maxBlobGas != 0 {
|
||||||
return
|
bf.results.blobGasUsedRatio = float64(*blobGasUsed) / float64(maxBlobGas)
|
||||||
}
|
}
|
||||||
bf.results.blobGasUsedRatio = float64(*blobGasUsed) / float64(maxBlobGas)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(percentiles) == 0 {
|
if len(percentiles) == 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue