graphql: end == 0 and begin > 0 should be reject

This commit is contained in:
Weixie Cui 2026-05-22 23:52:12 +08:00
parent efe58eac00
commit 537672247d

View file

@ -1433,7 +1433,7 @@ func (r *Resolver) Logs(ctx context.Context, args struct{ Filter FilterCriteria
if args.Filter.ToBlock != nil {
end = int64(*args.Filter.ToBlock)
}
if begin > 0 && end > 0 && begin > end {
if begin >= 0 && end >= 0 && begin > end {
return nil, errInvalidBlockRange
}
var addresses []common.Address