From 4e7fd897d83f5b00927c50dc24528ff26124d2f7 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 28 May 2024 18:31:53 +0800 Subject: [PATCH] core: fix failing tests (#22888) --- core/blockchain_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 75903c4b64..87f031b834 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -17,6 +17,7 @@ package core import ( + "errors" "fmt" "math" "math/big" @@ -1108,8 +1109,8 @@ func TestEIP155Transition(t *testing.T) { } }) _, err := blockchain.InsertChain(blocks) - if err != types.ErrInvalidChainId { - t.Error("expected error:", types.ErrInvalidChainId) + if have, want := err, types.ErrInvalidChainId; !errors.Is(have, want) { + t.Errorf("have %v, want %v", have, want) } }