forked from cerc-io/plugeth
eth/filters: reuse error msg for invalid block range (#28479)
This commit is contained in:
parent
6489a0dd1f
commit
e9f59b5d5e
@ -114,7 +114,7 @@ func (f *Filter) Logs(ctx context.Context) ([]*types.Log, error) {
|
||||
|
||||
// special case for pending logs
|
||||
if beginPending && !endPending {
|
||||
return nil, errors.New("invalid block range")
|
||||
return nil, errInvalidBlockRange
|
||||
}
|
||||
|
||||
// Short-cut if all we care about is pending logs
|
||||
|
@ -353,7 +353,7 @@ func TestFilters(t *testing.T) {
|
||||
},
|
||||
{
|
||||
f: sys.NewRangeFilter(int64(rpc.PendingBlockNumber), int64(rpc.LatestBlockNumber), nil, nil),
|
||||
err: "invalid block range",
|
||||
err: errInvalidBlockRange.Error(),
|
||||
},
|
||||
} {
|
||||
logs, err := tc.f.Logs(context.Background())
|
||||
|
Loading…
Reference in New Issue
Block a user