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