litep2p
litep2p copied to clipboard
ping: Verify received "pong" payload
We send a [0u8; 32]
payload to the peer, then we read the next payload sent by the peer.
After that, we could verify that what we sent (ping) was identical to what we received (pong).
This is to stay compliant with the p2p spec