diff --git a/runtime/interop/generate_keys.go b/runtime/interop/generate_keys.go index c3990fda9a0c..26f5dc146f11 100644 --- a/runtime/interop/generate_keys.go +++ b/runtime/interop/generate_keys.go @@ -64,7 +64,7 @@ func deterministicallyGenerateKeys(startIndex, numKeys uint64) ([]bls.SecretKey, numBytes := num.Bytes() // pad key at the start with zero bytes to make it into a 32 byte key if len(numBytes) < 32 { - emptyBytes := make([]byte, 32-len(numBytes)) + emptyBytes := make([]byte, 0, 32-len(numBytes)) numBytes = append(emptyBytes, numBytes...) } priv, err := bls.SecretKeyFromBytes(numBytes)