Skip to content

Commit c6a2f77

Browse files
authored
cmd/devp2p/internal/v4test: add pong validation in bond (#26400)
1 parent dad9250 commit c6a2f77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/devp2p/internal/v4test/discv4tests.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ func FindnodePastExpiration(t *utesting.T) {
395395

396396
// bond performs the endpoint proof with the remote node.
397397
func bond(t *utesting.T, te *testenv) {
398-
te.send(te.l1, &v4wire.Ping{
398+
pingHash := te.send(te.l1, &v4wire.Ping{
399399
Version: 4,
400400
From: te.localEndpoint(te.l1),
401401
To: te.remoteEndpoint(),
@@ -417,7 +417,9 @@ func bond(t *utesting.T, te *testenv) {
417417
})
418418
gotPing = true
419419
case *v4wire.Pong:
420-
// TODO: maybe verify pong data here
420+
if err := te.checkPong(req, pingHash); err != nil {
421+
t.Fatal(err)
422+
}
421423
gotPong = true
422424
}
423425
}

0 commit comments

Comments
 (0)