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-dms3
Commits
9420200a
Commit
9420200a
authored
10 years ago
by
Brian Tiger Chow
Committed by
Jeromy
10 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(merkle) use defer
parent
e720a6a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
merkledag/merkledag.go
merkledag/merkledag.go
+2
-1
No files found.
merkledag/merkledag.go
View file @
9420200a
...
...
@@ -307,6 +307,8 @@ func FindLink(n *Node, k u.Key, found []*Node) (int, error) {
func
(
ds
*
dagService
)
GetDAG
(
ctx
context
.
Context
,
root
*
Node
)
<-
chan
*
Node
{
sig
:=
make
(
chan
*
Node
)
go
func
()
{
defer
close
(
sig
)
var
keys
[]
u
.
Key
for
_
,
lnk
:=
range
root
.
Links
{
keys
=
append
(
keys
,
u
.
Key
(
lnk
.
Hash
))
...
...
@@ -350,7 +352,6 @@ func (ds *dagService) GetDAG(ctx context.Context, root *Node) <-chan *Node {
// TODO: bubble errors back up.
log
.
Errorf
(
"Did not receive correct number of nodes!"
)
}
close
(
sig
)
}()
return
sig
...
...
This diff is collapsed.
Click to expand it.
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