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-bitswap
Commits
2128a5a2
Commit
2128a5a2
authored
Apr 25, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove error return value from functions with no error
(fixes linter issues)
parent
af8c7b4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
decision/engine.go
decision/engine.go
+2
-4
No files found.
decision/engine.go
View file @
2128a5a2
...
...
@@ -221,7 +221,7 @@ func (e *Engine) Peers() []peer.ID {
// MessageReceived performs book-keeping. Returns error if passed invalid
// arguments.
func
(
e
*
Engine
)
MessageReceived
(
p
peer
.
ID
,
m
bsmsg
.
BitSwapMessage
)
error
{
func
(
e
*
Engine
)
MessageReceived
(
p
peer
.
ID
,
m
bsmsg
.
BitSwapMessage
)
{
if
m
.
Empty
()
{
log
.
Debugf
(
"received empty message from %s"
,
p
)
}
...
...
@@ -276,7 +276,6 @@ func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error {
log
.
Debugf
(
"got block %s %d bytes"
,
block
,
len
(
block
.
RawData
()))
l
.
ReceivedBytes
(
len
(
block
.
RawData
()))
}
return
nil
}
func
(
e
*
Engine
)
addBlock
(
block
blocks
.
Block
)
{
...
...
@@ -309,7 +308,7 @@ func (e *Engine) AddBlock(block blocks.Block) {
// inconsistent. Would need to ensure that Sends and acknowledgement of the
// send happen atomically
func
(
e
*
Engine
)
MessageSent
(
p
peer
.
ID
,
m
bsmsg
.
BitSwapMessage
)
error
{
func
(
e
*
Engine
)
MessageSent
(
p
peer
.
ID
,
m
bsmsg
.
BitSwapMessage
)
{
l
:=
e
.
findOrCreate
(
p
)
l
.
lk
.
Lock
()
defer
l
.
lk
.
Unlock
()
...
...
@@ -320,7 +319,6 @@ func (e *Engine) MessageSent(p peer.ID, m bsmsg.BitSwapMessage) error {
e
.
peerRequestQueue
.
Remove
(
block
.
Cid
(),
p
)
}
return
nil
}
func
(
e
*
Engine
)
PeerConnected
(
p
peer
.
ID
)
{
...
...
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