From f667d4cafe081913a22d30e3bde5ceaa12236fb0 Mon Sep 17 00:00:00 2001 From: lunargon Date: Sat, 31 May 2025 14:05:41 +0700 Subject: [PATCH] fix raise pruned history error in genesis block ( block 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 864dfd3746..f549dc4dec 100644 --- a/eth/filters/api.go +++ b/eth/filters/api.go @@ -359,7 +359,7 @@ func (api *FilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([]*type if begin > 0 && end > 0 && begin > end { return nil, errInvalidBlockRange } - if begin > 0 && begin < int64(api.events.backend.HistoryPruningCutoff()) { + if begin >= 0 && begin < int64(api.events.backend.HistoryPruningCutoff()) { return nil, &history.PrunedHistoryError{} } // Construct the range filter