1
0
mirror of https://github.com/libp2p/go-libp2p-peerstore.git synced 2025-03-24 13:10:06 +08:00

fix bug in PeersWithAddrs().

This commit is contained in:
Raúl Kripalani 2018-09-11 14:14:00 +01:00
parent 1b410c7294
commit eb2575505d

View File

@ -294,7 +294,7 @@ func (mgr *dsAddrBook) PeersWithAddrs() peer.IDSlice {
return peer.IDSlice{}
}
ids := make(peer.IDSlice, 1, len(idset))
ids := make(peer.IDSlice, 0, len(idset))
for id := range idset {
i, _ := peer.IDB58Decode(id)
ids = append(ids, i)