From 62bd9306b93fe0334d478070b0d3f54b967f804b 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 b8c702423595..414433e0633a 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -17,6 +17,7 @@ package core import ( + "errors" "fmt" "math" "math/big" @@ -1105,8 +1106,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) } }