mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
loose pong check
Signed-off-by: Delweng <delweng@gmail.com>
This commit is contained in:
parent
b636489898
commit
a4d3ebe822
1 changed files with 5 additions and 2 deletions
|
|
@ -137,10 +137,13 @@ the attempt from a different IP.`)
|
|||
t.Fatal("expected WHOAREYOU, got", resp)
|
||||
}
|
||||
|
||||
// Catch the PONG on l2.
|
||||
// Catch the PONG on l2. Only check the request ID here because cross-network
|
||||
// routing may rewrite the source IP, making PONG.ToIP differ from laddr(l2).IP.
|
||||
switch resp := conn.read(l2).(type) {
|
||||
case *v5wire.Pong:
|
||||
checkPong(t, resp, ping2, l2)
|
||||
if !bytes.Equal(resp.ReqID, ping2.ReqID) {
|
||||
t.Fatalf("wrong request ID %x in PONG, want %x", resp.ReqID, ping2.ReqID)
|
||||
}
|
||||
default:
|
||||
t.Fatal("expected PONG, got", resp)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue