forked from cerc-io/plugeth
graphql: logs return error if from block > to (#28412)
As per discussion in ethereum/execution-apis#475 Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
96b75033c0
commit
f7b62e5506
@ -1417,6 +1417,9 @@ func (r *Resolver) Logs(ctx context.Context, args struct{ Filter FilterCriteria
|
||||
if args.Filter.ToBlock != nil {
|
||||
end = int64(*args.Filter.ToBlock)
|
||||
}
|
||||
if begin > 0 && end > 0 && begin > end {
|
||||
return nil, errInvalidBlockRange
|
||||
}
|
||||
var addresses []common.Address
|
||||
if args.Filter.Addresses != nil {
|
||||
addresses = *args.Filter.Addresses
|
||||
|
Loading…
Reference in New Issue
Block a user