Skip to content

Commit

Permalink
Merge pull request #56 from ipfs/fix/make-session
Browse files Browse the repository at this point in the history
fix: correctly construct sessions
  • Loading branch information
Stebalien committed Apr 23, 2020
2 parents d532cda + 5ab627c commit a8d50ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions merkledag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a8d50ff

Please sign in to comment.