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
e4ee5dc8
Commit
e4ee5dc8
authored
Oct 18, 2017
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merkledag: keep key order in dedupeKeys
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
parent
0a5f16ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
merkledag.go
merkledag.go
+5
-2
No files found.
merkledag.go
View file @
e4ee5dc8
...
...
@@ -307,11 +307,14 @@ func GetNodes(ctx context.Context, ds DAGService, keys []*cid.Cid) []NodeGetter
// Remove duplicates from a list of keys
func
dedupeKeys
(
cids
[]
*
cid
.
Cid
)
[]
*
cid
.
Cid
{
out
:=
make
([]
*
cid
.
Cid
,
0
,
len
(
cids
))
set
:=
cid
.
NewSet
()
for
_
,
c
:=
range
cids
{
set
.
Add
(
c
)
if
set
.
Visit
(
c
)
{
out
=
append
(
out
,
c
)
}
}
return
set
.
Keys
()
return
out
}
func
newNodePromise
(
ctx
context
.
Context
)
NodeGetter
{
...
...
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