mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
p2p/discover/v5wire: use head.IV because it's shorter
This commit is contained in:
parent
64a054b06b
commit
73d67bd768
1 changed files with 1 additions and 2 deletions
|
|
@ -196,8 +196,7 @@ func (c *Codec) Encode(id enode.ID, addr string, packet Packet, challenge *Whoar
|
|||
// Just apply the masking again here to get back the complete encoding.
|
||||
c.buf.Reset()
|
||||
c.buf.Write(w.ChallengeData)
|
||||
var iv [16]byte
|
||||
copy(iv[:], w.ChallengeData)
|
||||
copy(head.IV[:], w.ChallengeData)
|
||||
enc := applyMasking(id, head.IV, c.buf.Bytes())
|
||||
return enc, w.Nonce, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue