Skip to content

Conversation

@soniseth0
Copy link
Contributor

drop the unused slices.Clone(c.buf.Bytes()) assignment before head.AuthData is rebuilt, eliminating a needless allocation without changing behaviour, keep the encode path exactly as before while trimming away the redundant work

@fjl fjl changed the title p2p/discover: remove redundant auth clone in v5 WHOAREYOU encode p2p/discover/v5wire: remove redundant bytes clone in WHOAREYOU encoding Nov 26, 2025
@fjl fjl added this to the 1.16.8 milestone Nov 26, 2025
@fjl fjl merged commit 1468331 into ethereum:master Nov 26, 2025
8 of 9 checks passed
prestoalvarez pushed a commit to prestoalvarez/go-ethereum that referenced this pull request Nov 27, 2025
…ng (ethereum#33180)

head.AuthData is assigned later in the function, so the earlier assignment
can safely be removed.
fjl pushed a commit to lightclient/go-ethereum that referenced this pull request Nov 28, 2025
…ng (ethereum#33180)

head.AuthData is assigned later in the function, so the earlier assignment
can safely be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants