diff --git a/core/commands/pubsub.go b/core/commands/pubsub.go index 111ce6804733..0b50c42cd262 100644 --- a/core/commands/pubsub.go +++ b/core/commands/pubsub.go @@ -333,7 +333,7 @@ To use, the daemon must be run with '--enable-pubsub-experiment'. } peers := n.Floodsub.ListPeers(topic) - list := &stringList{make([]string, len(peers), 0)} + list := &stringList{make([]string, 0, len(peers))} for _, peer := range peers { list.Strings = append(list.Strings, peer.Pretty())