From fa4cdd9d3d576c9d2f13026f88e2a81093a11d8f Mon Sep 17 00:00:00 2001 From: elnosh Date: Sat, 19 Oct 2024 11:18:30 -0500 Subject: [PATCH] capacity for keyset slice --- crypto/keyset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/keyset.go b/crypto/keyset.go index c7d982c..f3030c1 100644 --- a/crypto/keyset.go +++ b/crypto/keyset.go @@ -112,7 +112,7 @@ func DeriveKeysetId(keyset map[uint64]*secp256k1.PublicKey) string { return pubkeys[i].amount < pubkeys[j].amount }) - keys := make([]byte, 0) + keys := make([]byte, 0, len(pubkeys)*33) for _, key := range pubkeys { keys = append(keys, key.pk.SerializeCompressed()...) }