Commit bf9f36e3 authored by Steven Allen's avatar Steven Allen

bitswap: preallocate cid string array

License: MIT
Signed-off-by: default avatarSteven Allen <steven@stebalien.com>
parent 90d17a67
......@@ -73,7 +73,7 @@ func (ps *impl) Subscribe(ctx context.Context, keys ...*cid.Cid) <-chan blocks.B
}
func toStrings(keys []*cid.Cid) []string {
strs := make([]string, 0)
strs := make([]string, 0, len(keys))
for _, key := range keys {
strs = append(strs, key.KeyString())
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment