mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
Update filter_test.go
This commit is contained in:
parent
2a459ac7cc
commit
18ba260500
1 changed files with 6 additions and 5 deletions
|
|
@ -638,12 +638,13 @@ func TestRangeLimit(t *testing.T) {
|
||||||
t.Fatal("expected range limit error, got nil")
|
t.Fatal("expected range limit error, got nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
if r, ok := err.(rpc.Error); ok {
|
var re rpc.Error
|
||||||
if r.ErrorCode() != -32602 {
|
if errors.As(err, &re) {
|
||||||
t.Fatalf("expected error code -32602, got %d", r.ErrorCode())
|
if re.ErrorCode() != -32602 {
|
||||||
|
t.Fatalf("expected error code -32602, got %d", re.ErrorCode())
|
||||||
}
|
}
|
||||||
if r.Error() != "exceed maximum block range 5" {
|
if re.Error() != "exceed maximum block range 5" {
|
||||||
t.Fatalf("expected error message 'exceed maximum block range 5', got %q", r.Error())
|
t.Fatalf("expected error message 'exceed maximum block range 5', got %q", re.Error())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
t.Fatalf("expected rpc error, got %v", err)
|
t.Fatalf("expected rpc error, got %v", err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue