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
a9df187e
Commit
a9df187e
authored
Nov 03, 2016
by
Jeromy Johnson
Committed by
GitHub
Nov 03, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3351 from ipfs/kevina/raw-get-link-opt
merkledag: optimize DagService GetLinks for Raw Nodes.
parents
1ca2d428
bfe7ad7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
merkledag/merkledag.go
merkledag/merkledag.go
+3
-0
No files found.
merkledag/merkledag.go
View file @
a9df187e
...
@@ -114,6 +114,9 @@ func decodeBlock(b blocks.Block) (node.Node, error) {
...
@@ -114,6 +114,9 @@ func decodeBlock(b blocks.Block) (node.Node, error) {
}
}
func
(
n
*
dagService
)
GetLinks
(
ctx
context
.
Context
,
c
*
cid
.
Cid
)
([]
*
node
.
Link
,
error
)
{
func
(
n
*
dagService
)
GetLinks
(
ctx
context
.
Context
,
c
*
cid
.
Cid
)
([]
*
node
.
Link
,
error
)
{
if
c
.
Type
()
==
cid
.
Raw
{
return
nil
,
nil
}
node
,
err
:=
n
.
Get
(
ctx
,
c
)
node
,
err
:=
n
.
Get
(
ctx
,
c
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
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