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
c5d14421
Commit
c5d14421
authored
Dec 14, 2014
by
Brian Tiger Chow
Committed by
Jeromy
Dec 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(merkle): move var dec closer to use
parent
a604200d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
merkledag.go
merkledag.go
+1
-3
No files found.
merkledag.go
View file @
c5d14421
...
@@ -308,14 +308,12 @@ func (ds *dagService) GetDAG(ctx context.Context, root *Node) <-chan *Node {
...
@@ -308,14 +308,12 @@ func (ds *dagService) GetDAG(ctx context.Context, root *Node) <-chan *Node {
sig
:=
make
(
chan
*
Node
)
sig
:=
make
(
chan
*
Node
)
go
func
()
{
go
func
()
{
var
keys
[]
u
.
Key
var
keys
[]
u
.
Key
nodes
:=
make
([]
*
Node
,
len
(
root
.
Links
))
for
_
,
lnk
:=
range
root
.
Links
{
for
_
,
lnk
:=
range
root
.
Links
{
keys
=
append
(
keys
,
u
.
Key
(
lnk
.
Hash
))
keys
=
append
(
keys
,
u
.
Key
(
lnk
.
Hash
))
}
}
blkchan
:=
ds
.
Blocks
.
GetBlocks
(
ctx
,
keys
)
blkchan
:=
ds
.
Blocks
.
GetBlocks
(
ctx
,
keys
)
nodes
:=
make
([]
*
Node
,
len
(
root
.
Links
))
next
:=
0
next
:=
0
for
blk
:=
range
blkchan
{
for
blk
:=
range
blkchan
{
i
,
err
:=
FindLink
(
root
,
blk
.
Key
(),
nodes
)
i
,
err
:=
FindLink
(
root
,
blk
.
Key
(),
nodes
)
...
...
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