Cleanup / temp buffers for various things

This commit is contained in:
jdl
2026-06-12 14:16:38 +02:00
parent 6856727985
commit 4d2aa5c8c7
10 changed files with 30 additions and 17 deletions

View File

@@ -23,8 +23,9 @@ func (a *App) onMulticastDiscovery(pkt multicast.Packet) {
return
}
// Authenticate the beacon against the peer's known sign key.
if !pkt.Verify(a.mcVerifyBuf, &peer.SignPubKey) {
// Authenticate the beacon against the peer's known sign key. scratch[:0]
// gives sign.Open an empty-but-capacity buffer to decode into.
if !pkt.Verify(a.scratch[:0], &peer.SignPubKey) {
return
}