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
3f05aa05
Commit
3f05aa05
authored
Jun 17, 2016
by
Jeromy Johnson
Committed by
GitHub
Jun 17, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2853 from ipfs/feature/decapitalize-Debug
Decapitalized log.Debug messages
parents
47d10d7b
2203d3b1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
dht.go
dht.go
+1
-1
dht_net.go
dht_net.go
+1
-1
handlers.go
handlers.go
+1
-1
records.go
records.go
+1
-1
routing.go
routing.go
+3
-3
No files found.
dht.go
View file @
3f05aa05
...
...
@@ -267,7 +267,7 @@ func (dht *IpfsDHT) betterPeersToQuery(pmes *pb.Message, p peer.ID, count int) [
// == to self? thats bad
for
_
,
p
:=
range
closer
{
if
p
==
dht
.
self
{
log
.
Debug
(
"
A
ttempted to return self! this shouldnt happen..."
)
log
.
Debug
(
"
a
ttempted to return self! this shouldn
'
t happen..."
)
return
nil
}
}
...
...
dht_net.go
View file @
3f05aa05
...
...
@@ -54,7 +54,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
// if nil response, return it before serializing
if
rpmes
==
nil
{
log
.
Debug
(
"
G
ot back nil response from request
.
"
)
log
.
Debug
(
"
g
ot back nil response from request"
)
continue
}
...
...
handlers.go
View file @
3f05aa05
...
...
@@ -108,7 +108,7 @@ func (dht *IpfsDHT) checkLocalDatastore(k key.Key) (*pb.Record, error) {
rec
:=
new
(
pb
.
Record
)
err
=
proto
.
Unmarshal
(
byts
,
rec
)
if
err
!=
nil
{
log
.
Debug
(
"
F
ailed to unmarshal DHT record from datastore
.
"
)
log
.
Debug
(
"
f
ailed to unmarshal DHT record from datastore"
)
return
nil
,
err
}
...
...
records.go
View file @
3f05aa05
...
...
@@ -84,7 +84,7 @@ func (dht *IpfsDHT) getPublicKeyFromNode(ctx context.Context, p peer.ID) (ci.Pub
// validity because a) we can't. b) we know the hash of the
// key we're looking for.
val
:=
record
.
GetValue
()
log
.
Debug
(
"DHT got a value from other peer
.
"
)
log
.
Debug
(
"DHT got a value from other peer"
)
pk
,
err
=
ci
.
UnmarshalPublicKey
(
val
)
if
err
!=
nil
{
...
...
routing.go
View file @
3f05aa05
...
...
@@ -46,7 +46,7 @@ func (dht *IpfsDHT) PutValue(ctx context.Context, key key.Key, value []byte) err
rec
,
err
:=
record
.
MakePutRecord
(
sk
,
key
,
value
,
sign
)
if
err
!=
nil
{
log
.
Debug
(
"
C
reation of record failed!"
)
log
.
Debug
(
"
c
reation of record failed!"
)
return
err
}
...
...
@@ -346,7 +346,7 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
select
{
case
peerOut
<-
prov
:
case
<-
ctx
.
Done
()
:
log
.
Debug
(
"
C
ontext timed out sending more providers"
)
log
.
Debug
(
"
c
ontext timed out sending more providers"
)
return
nil
,
ctx
.
Err
()
}
}
...
...
@@ -397,7 +397,7 @@ func (dht *IpfsDHT) FindPeer(ctx context.Context, id peer.ID) (pstore.PeerInfo,
// Sanity...
for
_
,
p
:=
range
peers
{
if
p
==
id
{
log
.
Debug
(
"
F
ound target peer in list of closest peers..."
)
log
.
Debug
(
"
f
ound target peer in list of closest peers..."
)
return
dht
.
peerstore
.
PeerInfo
(
p
),
nil
}
}
...
...
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