mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
p2p: use errors.Is instead of reflect.DeepEqual for error comparison
This commit is contained in:
parent
17fcefa1c4
commit
4e49b437e3
1 changed files with 1 additions and 1 deletions
|
|
@ -147,7 +147,7 @@ func TestProtocolHandshakeErrors(t *testing.T) {
|
|||
p1, p2 := MsgPipe()
|
||||
go Send(p1, test.code, test.msg)
|
||||
_, err := readProtocolHandshake(p2)
|
||||
if !reflect.DeepEqual(err, test.err) {
|
||||
if !errors.Is(err, test.err) {
|
||||
t.Errorf("test %d: error mismatch: got %q, want %q", i, err, test.err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue