From 5477566fa9cb1b5dc2552f8a0f70e1857adad246 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sat, 3 Sep 2022 12:38:42 +0100 Subject: [PATCH] Length not capacity --- src/core/core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.go b/src/core/core.go index 22baa58a..6b9fe547 100644 --- a/src/core/core.go +++ b/src/core/core.go @@ -55,7 +55,7 @@ func New(secret ed25519.PrivateKey, logger util.Logger, opts ...SetupOption) (*C if len(secret) != ed25519.PrivateKeySize { return nil, fmt.Errorf("private key is incorrect length") } - c.secret = make(ed25519.PrivateKey, 0, ed25519.PrivateKeySize) + c.secret = make(ed25519.PrivateKey, ed25519.PrivateKeySize) copy(c.secret, secret) c.public = secret.Public().(ed25519.PublicKey) var err error