Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-merkledag
Commits
a8d50ff1
Unverified
Commit
a8d50ff1
authored
Apr 23, 2020
by
Steven Allen
Committed by
GitHub
Apr 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #56 from ipfs/fix/make-session
fix: correctly construct sessions
parents
d532cda6
5ab627cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
merkledag.go
merkledag.go
+1
-5
No files found.
merkledag.go
View file @
a8d50ff1
...
@@ -166,11 +166,7 @@ func FetchGraph(ctx context.Context, root cid.Cid, serv ipld.DAGService) error {
...
@@ -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 "fetch root and its direct children" and so on...
// maxDepth=-1 means unlimited.
// maxDepth=-1 means unlimited.
func
FetchGraphWithDepthLimit
(
ctx
context
.
Context
,
root
cid
.
Cid
,
depthLim
int
,
serv
ipld
.
DAGService
)
error
{
func
FetchGraphWithDepthLimit
(
ctx
context
.
Context
,
root
cid
.
Cid
,
depthLim
int
,
serv
ipld
.
DAGService
)
error
{
var
ng
ipld
.
NodeGetter
=
serv
var
ng
ipld
.
NodeGetter
=
NewSession
(
ctx
,
serv
)
ds
,
ok
:=
serv
.
(
*
dagService
)
if
ok
{
ng
=
&
sesGetter
{
bserv
.
NewSession
(
ctx
,
ds
.
Blocks
)}
}
set
:=
make
(
map
[
cid
.
Cid
]
int
)
set
:=
make
(
map
[
cid
.
Cid
]
int
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment