Cleanup / temp buffers for various things
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user