This commit is contained in:
rayoo 2026-07-17 21:53:37 -07:00 committed by GitHub
commit ffdabb1c4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -478,7 +478,7 @@ func (api *FilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([]*type
end = crit.ToBlock.Int64()
}
// Block numbers below 0 are special cases.
if begin > 0 && end > 0 && begin > end {
if begin >= 0 && end >= 0 && begin > end {
return nil, errInvalidBlockRange
}
if begin >= 0 && begin < int64(api.events.backend.HistoryPruningCutoff()) {