Unverified Commit a8d50ff1 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #56 from ipfs/fix/make-session

fix: correctly construct sessions
parents d532cda6 5ab627cb
......@@ -166,11 +166,7 @@ func FetchGraph(ctx context.Context, root cid.Cid, serv ipld.DAGService) error {
// maxDepth=1 means "fetch root and its direct children" and so on...
// maxDepth=-1 means unlimited.
func FetchGraphWithDepthLimit(ctx context.Context, root cid.Cid, depthLim int, serv ipld.DAGService) error {
var ng ipld.NodeGetter = serv
ds, ok := serv.(*dagService)
if ok {
ng = &sesGetter{bserv.NewSession(ctx, ds.Blocks)}
}
var ng ipld.NodeGetter = NewSession(ctx, serv)
set := make(map[cid.Cid]int)
......
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