eth/gasprice: fix deserialization error for foundry

This commit is contained in:
Daniel Liu 2025-03-13 18:27:39 +08:00
parent 21a430963c
commit 975cddacc5

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)
}
}
}