mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth/filters: check in rpc level
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
aac7d4e524
commit
ed51166a05
1 changed files with 3 additions and 0 deletions
|
|
@ -348,6 +348,9 @@ func (api *FilterAPI) GetLogs(ctx context.Context, crit FilterCriteria) ([]*type
|
|||
if crit.ToBlock != nil {
|
||||
end = crit.ToBlock.Int64()
|
||||
}
|
||||
if begin > 0 && end > 0 && begin > end {
|
||||
return nil, errInvalidBlockRange
|
||||
}
|
||||
// Construct the range filter
|
||||
filter = api.sys.NewRangeFilter(begin, end, crit.Addresses, crit.Topics)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue