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-blockservice
Commits
d63258a4
Commit
d63258a4
authored
Dec 10, 2014
by
Jeromy
Committed by
Juan Batiz-Benet
Dec 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blockstore.ErrNotFound, and proper wantlist sorting
parent
cb2398d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
blockservice.go
blockservice.go
+1
-3
No files found.
blockservice.go
View file @
d63258a4
...
...
@@ -8,8 +8,6 @@ import (
"fmt"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
ds
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
blocks
"github.com/jbenet/go-ipfs/blocks"
"github.com/jbenet/go-ipfs/blocks/blockstore"
exchange
"github.com/jbenet/go-ipfs/exchange"
...
...
@@ -67,7 +65,7 @@ func (s *BlockService) GetBlock(ctx context.Context, k u.Key) (*blocks.Block, er
return
block
,
nil
// TODO be careful checking ErrNotFound. If the underlying
// implementation changes, this will break.
}
else
if
err
==
ds
.
ErrNotFound
&&
s
.
Exchange
!=
nil
{
}
else
if
err
==
blockstore
.
ErrNotFound
&&
s
.
Exchange
!=
nil
{
log
.
Debug
(
"Blockservice: Searching bitswap."
)
blk
,
err
:=
s
.
Exchange
.
GetBlock
(
ctx
,
k
)
if
err
!=
nil
{
...
...
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