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
a167f177
Commit
a167f177
authored
Dec 07, 2017
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merkledag/utils: switch copyDag to node.Node
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
f0dc6dbc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
utils/utils.go
utils/utils.go
+2
-8
No files found.
utils/utils.go
View file @
a167f177
...
...
@@ -194,7 +194,7 @@ func (e *Editor) Finalize(ds dag.DAGService) (*dag.ProtoNode, error) {
return
nd
,
err
}
func
copyDag
(
nd
*
dag
.
Proto
Node
,
from
,
to
dag
.
DAGService
)
error
{
func
copyDag
(
nd
node
.
Node
,
from
,
to
dag
.
DAGService
)
error
{
_
,
err
:=
to
.
Add
(
nd
)
if
err
!=
nil
{
return
err
...
...
@@ -211,13 +211,7 @@ func copyDag(nd *dag.ProtoNode, from, to dag.DAGService) error {
return
err
}
childpb
,
ok
:=
child
.
(
*
dag
.
ProtoNode
)
if
!
ok
{
// leaf node
_
,
err
:=
to
.
Add
(
nd
)
return
err
}
err
=
copyDag
(
childpb
,
from
,
to
)
err
=
copyDag
(
child
,
from
,
to
)
if
err
!=
nil
{
return
err
}
...
...
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