p2p/discover/v5wire: remove redundant bytes clone in WHOAREYOU encoding (#33180)

head.AuthData is assigned later in the function, so the earlier assignment
can safely be removed.
This commit is contained in:
oxBoni 2025-11-26 15:34:11 +01:00 committed by GitHub
parent 3f7cd905b0
commit 1468331f9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -326,7 +326,6 @@ func (c *Codec) encodeWhoareyou(toID enode.ID, packet *Whoareyou) (Header, error
// Create header.
head := c.makeHeader(toID, flagWhoareyou, 0)
head.AuthData = slices.Clone(c.buf.Bytes())
head.Nonce = packet.Nonce
// Encode auth data.