Skip to content

Commit 23ee186

Browse files
soniseth0fjl
authored andcommitted
p2p/discover/v5wire: remove redundant bytes clone in WHOAREYOU encoding (ethereum#33180)
head.AuthData is assigned later in the function, so the earlier assignment can safely be removed.
1 parent 32bc4fc commit 23ee186

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

p2p/discover/v5wire/encoding.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ func (c *Codec) encodeWhoareyou(toID enode.ID, packet *Whoareyou) (Header, error
326326

327327
// Create header.
328328
head := c.makeHeader(toID, flagWhoareyou, 0)
329-
head.AuthData = slices.Clone(c.buf.Bytes())
330329
head.Nonce = packet.Nonce
331330

332331
// Encode auth data.

0 commit comments

Comments
 (0)