Commit 671dfd04 authored by gatesvp's avatar gatesvp Committed by Juan Batiz-Benet

Move IPNS resolutions into the core library

Move IPNS resolutions into the core library via the pathresolver.go
file. Fix the CLI commands to leverage this core component.
parent fa99d7e3
......@@ -28,12 +28,11 @@ type Reader struct {
err error
}
func NewReader(path path.Path, dag mdag.DAGService, resolver *path.Resolver, compression int) (*Reader, error) {
func NewReader(path path.Path, dag mdag.DAGService, dagnode *mdag.Node, compression int) (*Reader, error) {
reader := &Reader{
signalChan: make(chan struct{}),
dag: dag,
resolver: resolver,
}
var err error
......@@ -47,11 +46,6 @@ func NewReader(path path.Path, dag mdag.DAGService, resolver *path.Resolver, com
reader.writer = tar.NewWriter(&reader.buf)
}
dagnode, err := resolver.ResolvePath(path)
if err != nil {
return nil, err
}
// writeToBuf will write the data to the buffer, and will signal when there
// is new data to read
_, filename := gopath.Split(path.String())
......
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