Commit 8e42e86d authored by Brian Tiger Chow's avatar Brian Tiger Chow

hack(core): instantiate peerstore at the end if it hasn't already been instantiated

this is a dirty hack
parent 707874c3
......@@ -105,6 +105,9 @@ func NewIPFSNode(ctx context.Context, option ConfigOption) (*IpfsNode, error) {
if err != nil {
return nil, debugerror.Wrap(err)
}
if node.Peerstore == nil {
node.Peerstore = peer.NewPeerstore()
}
node.DAG = merkledag.NewDAGService(node.Blocks)
node.Pinning, err = pin.LoadPinner(node.Datastore, node.DAG)
if err != nil {
......
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