From 0c392b78cfc6189436a34512544177899d475421 Mon Sep 17 00:00:00 2001 From: rayoo Date: Fri, 29 May 2026 15:18:15 +0800 Subject: [PATCH] eth/filters: reject GetLogs range with begin > 0 and end == 0 --- eth/filters/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/filters/api.go b/eth/filters/api.go index e4ade96598..46b4997da3 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -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()) {