eth/gasprice: fix testcase

This commit is contained in:
MariusVanDerWijden 2026-01-28 15:35:02 +01:00
parent c772db8404
commit e372311a9c

View file

@ -259,7 +259,9 @@ func (oracle *Oracle) getBlockValues(ctx context.Context, blockNum uint64, limit
copy(sortedTxs, txs)
baseFee := block.BaseFee()
baseFee256 := new(uint256.Int)
baseFee256.SetFromBig(baseFee)
if baseFee != nil {
baseFee256.SetFromBig(baseFee)
}
slices.SortFunc(sortedTxs, func(a, b *types.Transaction) int {
return a.EffectiveGasTipCmp(b, baseFee256)
})