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
c83c43a2
Commit
c83c43a2
authored
Jan 04, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bitswap: log superfluous messages
parent
e4cdc05a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
decision/engine.go
decision/engine.go
+6
-1
No files found.
decision/engine.go
View file @
c83c43a2
...
...
@@ -149,9 +149,13 @@ func (e *Engine) Peers() []peer.ID {
// arguments.
func
(
e
*
Engine
)
MessageReceived
(
p
peer
.
ID
,
m
bsmsg
.
BitSwapMessage
)
error
{
log
:=
log
.
Prefix
(
"bitswap.Engine.MessageReceived(%s)"
,
p
)
log
.
Debugf
(
"enter
"
)
log
.
Debugf
(
"enter
. %d entries %d blocks"
,
len
(
m
.
Wantlist
()),
len
(
m
.
Blocks
())
)
defer
log
.
Debugf
(
"exit"
)
if
len
(
m
.
Wantlist
())
==
0
&&
len
(
m
.
Blocks
())
==
0
{
log
.
Info
(
"superfluous message"
)
}
newWorkExists
:=
false
defer
func
()
{
if
newWorkExists
{
...
...
@@ -166,6 +170,7 @@ func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error {
if
m
.
Full
()
{
l
.
wantList
=
wl
.
New
()
}
for
_
,
entry
:=
range
m
.
Wantlist
()
{
if
entry
.
Cancel
{
log
.
Debug
(
"cancel"
,
entry
.
Key
)
...
...
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