cmd/devp2p/internal/v5test: fix challenge data mismatch error

Label the actual and expected challenge data values in the WHOAREYOU resend test failure. This makes the diagnostic clear when the resent ChallengeData does not match the original challenge.
This commit is contained in:
Weixie Cui 2026-06-09 20:00:00 +08:00
parent 1f87331fbc
commit 84e44f2607

View file

@ -186,7 +186,7 @@ func (s *Suite) TestHandshakeResend(t *utesting.T) {
t.Fatalf("wrong nonce %x in WHOAREYOU (want %x)", resp.Nonce[:], challenge1.Nonce[:])
}
if !bytes.Equal(resp.ChallengeData, challenge1.ChallengeData) {
t.Fatalf("wrong ChallengeData in resent WHOAREYOU (want %x)", resp.ChallengeData, challenge1.ChallengeData)
t.Fatalf("wrong ChallengeData in resent WHOAREYOU: got %x, want %x", resp.ChallengeData, challenge1.ChallengeData)
}
resp.Node = conn.remote
default: