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
96a29940
Commit
96a29940
authored
Oct 26, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lots of logging
parent
ce2404ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
bitswap.go
bitswap.go
+0
-1
network/net_message_adapter.go
network/net_message_adapter.go
+4
-0
No files found.
bitswap.go
View file @
96a29940
...
...
@@ -135,7 +135,6 @@ func (bs *bitswap) ReceiveMessage(ctx context.Context, p peer.Peer, incoming bsm
peer
.
Peer
,
bsmsg
.
BitSwapMessage
)
{
log
.
Debugf
(
"ReceiveMessage from %v"
,
p
.
Key
())
log
.
Debugf
(
"Message wantlist: %v"
,
incoming
.
Wantlist
())
log
.
Debugf
(
"Message blockset: %v"
,
incoming
.
Blocks
())
if
p
==
nil
{
log
.
Error
(
"Received message from nil peer!"
)
...
...
network/net_message_adapter.go
View file @
96a29940
...
...
@@ -4,6 +4,7 @@ import (
"errors"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
"github.com/jbenet/go-ipfs/util"
bsmsg
"github.com/jbenet/go-ipfs/exchange/bitswap/message"
inet
"github.com/jbenet/go-ipfs/net"
...
...
@@ -11,6 +12,8 @@ import (
peer
"github.com/jbenet/go-ipfs/peer"
)
var
log
=
util
.
Logger
(
"net_message_adapter"
)
// NetMessageAdapter wraps a NetMessage network service
func
NetMessageAdapter
(
s
inet
.
Service
,
n
inet
.
Network
,
r
Receiver
)
Adapter
{
adapter
:=
impl
{
...
...
@@ -60,6 +63,7 @@ func (adapter *impl) HandleMessage(
return
nil
}
log
.
Debugf
(
"Message size: %d"
,
len
(
outgoing
.
Data
()))
return
outgoing
}
...
...
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