core: fix failing tests (#22888)

This commit is contained in:
Daniel Liu 2024-05-28 18:31:53 +08:00
parent e18553b855
commit 4e7fd897d8

View file

@ -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)
}
}