mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +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")
|
||||
}
|
||||
|
||||
if r, ok := err.(rpc.Error); ok {
|
||||
if r.ErrorCode() != -32602 {
|
||||
t.Fatalf("expected error code -32602, got %d", r.ErrorCode())
|
||||
var re rpc.Error
|
||||
if errors.As(err, &re) {
|
||||
if re.ErrorCode() != -32602 {
|
||||
t.Fatalf("expected error code -32602, got %d", re.ErrorCode())
|
||||
}
|
||||
if r.Error() != "exceed maximum block range 5" {
|
||||
t.Fatalf("expected error message 'exceed maximum block range 5', got %q", r.Error())
|
||||
if re.Error() != "exceed maximum block range 5" {
|
||||
t.Fatalf("expected error message 'exceed maximum block range 5', got %q", re.Error())
|
||||
}
|
||||
} else {
|
||||
t.Fatalf("expected rpc error, got %v", err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue