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
p2p
go-p2p-kad-dht
Commits
185fb6eb
Commit
185fb6eb
authored
Feb 15, 2019
by
Matt Joiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alter some logging
parent
931ed229
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
handlers.go
handlers.go
+1
-2
log_test.go
log_test.go
+7
-0
No files found.
handlers.go
View file @
185fb6eb
...
...
@@ -282,7 +282,6 @@ func (dht *IpfsDHT) handleFindPeer(ctx context.Context, p peer.ID, pmes *pb.Mess
for
_
,
pi
:=
range
closestinfos
{
if
len
(
pi
.
Addrs
)
>
0
{
withAddresses
=
append
(
withAddresses
,
pi
)
logger
.
Debugf
(
"handleFindPeer: sending back '%s'"
,
pi
.
ID
)
}
}
...
...
@@ -366,7 +365,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M
continue
}
logger
.
Info
f
(
"received provider %s for %s (addrs: %s)"
,
p
,
c
,
pi
.
Addrs
)
logger
.
Debug
f
(
"received provider %s for %s (addrs: %s)"
,
p
,
c
,
pi
.
Addrs
)
if
pi
.
ID
!=
dht
.
self
{
// don't add own addrs.
// add the received addresses to our peerstore.
dht
.
peerstore
.
AddAddrs
(
pi
.
ID
,
pi
.
Addrs
,
pstore
.
ProviderAddrTTL
)
...
...
log_test.go
0 → 100644
View file @
185fb6eb
package
dht
import
"log"
func
init
()
{
log
.
SetFlags
(
log
.
Flags
()
|
log
.
Llongfile
)
}
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