mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
eth/filters: reject GetLogs range with begin > 0 and end == 0
This commit is contained in:
parent
0ef867b292
commit
0c392b78cf
1 changed files with 1 additions and 1 deletions
|
|
@ -478,7 +478,7 @@ func (api *FilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([]*type
|
||||||
end = crit.ToBlock.Int64()
|
end = crit.ToBlock.Int64()
|
||||||
}
|
}
|
||||||
// Block numbers below 0 are special cases.
|
// Block numbers below 0 are special cases.
|
||||||
if begin > 0 && end > 0 && begin > end {
|
if begin >= 0 && end >= 0 && begin > end {
|
||||||
return nil, errInvalidBlockRange
|
return nil, errInvalidBlockRange
|
||||||
}
|
}
|
||||||
if begin >= 0 && begin < int64(api.events.backend.HistoryPruningCutoff()) {
|
if begin >= 0 && begin < int64(api.events.backend.HistoryPruningCutoff()) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue