diff --git a/core/core.go b/core/core.go index d9ea290e11bc2b64bd83a75d32123af4919de007..f8f2ed2bb41a7717c60d7760bd83eac7b798fa50 100644 --- a/core/core.go +++ b/core/core.go @@ -34,8 +34,8 @@ type IpfsNode struct { // the local node's identity Identity *peer.Peer - // the map of other nodes (Peer instances) - PeerMap *peer.Map + // storage for other Peer instances + Peerstore *peer.Peerstore // the local datastore Datastore ds.Datastore @@ -78,6 +78,8 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) { return nil, err } + peerstore := peer.NewPeerstore() + var ( net *inet.Network // TODO: refactor so we can use IpfsRouting interface instead of being DHT-specific @@ -125,7 +127,7 @@ func NewIpfsNode(cfg *config.Config, online bool) (*IpfsNode, error) { return &IpfsNode{ Config: cfg, - PeerMap: &peer.Map{}, + Peerstore: peerstore, Datastore: d, Blocks: bs, DAG: dag,