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
246c5561
Commit
246c5561
authored
Sep 15, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refac(bitswap:interface) GetBlock, HaveBlock -> Block, HasBlock
parent
8362ab4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
blockservice.go
blockservice.go
+2
-2
No files found.
blockservice.go
View file @
246c5561
...
...
@@ -42,7 +42,7 @@ func (s *BlockService) AddBlock(b *blocks.Block) (u.Key, error) {
return
k
,
err
}
if
s
.
Remote
!=
nil
{
err
=
s
.
Remote
.
Ha
ve
Block
(
b
)
err
=
s
.
Remote
.
Ha
s
Block
(
b
)
}
return
k
,
err
}
...
...
@@ -65,7 +65,7 @@ func (s *BlockService) GetBlock(k u.Key) (*blocks.Block, error) {
},
nil
}
else
if
err
==
ds
.
ErrNotFound
&&
s
.
Remote
!=
nil
{
u
.
DOut
(
"Blockservice: Searching bitswap.
\n
"
)
blk
,
err
:=
s
.
Remote
.
Get
Block
(
k
,
time
.
Second
*
5
)
blk
,
err
:=
s
.
Remote
.
Block
(
k
,
time
.
Second
*
5
)
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