mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
eth/filters: fix pruned history error for genesis block (#31941)
Fixes an issue where querying logs for block ranges starting from 0 would fail with an irrelevant error on a pruned node. Now the correct "history is pruned" error will be returned.
This commit is contained in:
parent
ef464179a1
commit
778430a689
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue