Commit 70ea4f54 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet Committed by Brian Tiger Chow

added peerstore to core

parent 9c6a3b20
......@@ -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,
......
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