Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Allocate less memory in AddrForKey
Browse files Browse the repository at this point in the history
This backports the microoptimization fix initially introduced in [1].

[1]: yggdrasil-network/yggdrasil-go#801
  • Loading branch information
tdemin committed Jul 31, 2021
1 parent f5ca266 commit ae62b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto.go
Expand Up @@ -28,7 +28,7 @@ func AddrForKey(key ed25519.PublicKey) *address.Address {
buf[idx] = ^buf[idx]
}
var addr address.Address
var temp = make([]byte, 0, 128)
var temp = make([]byte, 0, 32)
done := false
ones := byte(0)
bits := byte(0)
Expand Down

0 comments on commit ae62b45

Please sign in to comment.