Merge pull request #801 from tdemin/develop

Preallocate memory when deriving address from key
This commit is contained in:
Arceliar 2021-07-08 17:47:43 -05:00 committed by GitHub
commit 747a2538d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ func AddrForKey(publicKey ed25519.PublicKey) *Address {
buf[idx] = ^buf[idx] buf[idx] = ^buf[idx]
} }
var addr Address var addr Address
var temp []byte var temp = make([]byte, 0, 32)
done := false done := false
ones := byte(0) ones := byte(0)
bits := byte(0) bits := byte(0)