Merge pull request #910 from gzliudan/fix_fee_history

eth/gasprice: fix deserialization error for foundry
This commit is contained in:
Daniel Liu 2025-03-14 08:02:12 +08:00 committed by GitHub
commit bdd7cf1f0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,7 +124,11 @@ func (oracle *Oracle) processBlock(bf *blockFees, percentiles []float64) {
txIndex++
sumGasUsed += sorter[txIndex].gasUsed
}
bf.results.reward[i] = sorter[txIndex].reward
if sorter[txIndex].reward.Sign() >= 0 {
bf.results.reward[i] = sorter[txIndex].reward
} else {
bf.results.reward[i] = new(big.Int)
}
}
}