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
af4ae9ae
Commit
af4ae9ae
authored
Oct 25, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add context to blockservice Get
parent
d45513e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
merkledag.go
merkledag.go
+5
-1
No files found.
merkledag.go
View file @
af4ae9ae
...
...
@@ -2,6 +2,9 @@ package merkledag
import
(
"fmt"
"time"
"code.google.com/p/go.net/context"
mh
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash"
blocks
"github.com/jbenet/go-ipfs/blocks"
...
...
@@ -204,7 +207,8 @@ func (n *DAGService) Get(k u.Key) (*Node, error) {
return
nil
,
fmt
.
Errorf
(
"DAGService is nil"
)
}
b
,
err
:=
n
.
Blocks
.
GetBlock
(
k
)
ctx
,
_
:=
context
.
WithTimeout
(
context
.
TODO
(),
time
.
Second
*
5
)
b
,
err
:=
n
.
Blocks
.
GetBlock
(
ctx
,
k
)
if
err
!=
nil
{
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