p2p/discover: fix comment on encode

This commit is contained in:
Felix Lange 2020-03-13 21:53:02 +01:00
parent 99e3ada571
commit 18a1ba0956

View file

@ -225,8 +225,8 @@ func newWireCodec(ln *enode.LocalNode, key *ecdsa.PrivateKey, clock mclock.Clock
}
// encode encodes a packet to a node. 'id' and 'addr' specify the destination node. The
// 'token' parameter should be set to the token in the most recently received WHOAREYOU
// packet.
// 'challenge' parameter should be the most recently received WHOAREYOU packet from that
// node.
func (c *wireCodec) encode(id enode.ID, addr string, packet packetV5, challenge *whoareyouV5) ([]byte, []byte, error) {
if packet.kind() == p_whoareyouV5 {
p := packet.(*whoareyouV5)