2022-08-18 20:53:06 +08:00
|
|
|
// Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/host/peerstore.
|
2016-06-01 02:31:50 +08:00
|
|
|
package peerstore
|
2015-10-01 06:42:55 +08:00
|
|
|
|
|
|
|
import (
|
2022-08-18 20:53:06 +08:00
|
|
|
"github.com/libp2p/go-libp2p/core/peer"
|
|
|
|
pstore "github.com/libp2p/go-libp2p/core/peerstore"
|
|
|
|
"github.com/libp2p/go-libp2p/p2p/host/peerstore"
|
2015-10-01 06:42:55 +08:00
|
|
|
)
|
|
|
|
|
2022-08-18 20:53:06 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore.PeerInfos instead
|
2019-05-31 21:51:16 +08:00
|
|
|
func PeerInfos(ps pstore.Peerstore, peers peer.IDSlice) []peer.AddrInfo {
|
2022-08-18 20:53:06 +08:00
|
|
|
return peerstore.PeerInfos(ps, peers)
|
2015-10-01 06:42:55 +08:00
|
|
|
}
|
|
|
|
|
2022-08-18 20:53:06 +08:00
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore.PeerInfoIDs instead
|
2019-05-31 21:51:16 +08:00
|
|
|
func PeerInfoIDs(pis []peer.AddrInfo) peer.IDSlice {
|
2022-08-18 20:53:06 +08:00
|
|
|
return peerstore.PeerInfoIDs(pis)
|
2015-10-01 06:42:55 +08:00
|
|
|
}
|