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
95293f0f
Commit
95293f0f
authored
Aug 03, 2018
by
gpestana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Idiomatic fixes
parent
17d72d8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dht.go
dht.go
+3
-3
No files found.
dht.go
View file @
95293f0f
...
...
@@ -150,7 +150,7 @@ func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID,
pmes
.
Record
=
rec
rpmes
,
err
:=
dht
.
sendRequest
(
ctx
,
p
,
pmes
)
if
err
!=
nil
{
log
.
Warnin
gf
(
"putValueToPeer: %
s
. (peer: %s, key: %s)"
,
err
.
Error
()
,
p
.
Pretty
(),
key
)
log
.
Debu
gf
(
"putValueToPeer: %
v
. (peer: %s, key: %s)"
,
err
,
p
.
Pretty
(),
key
)
return
err
}
...
...
@@ -231,7 +231,7 @@ func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) {
log
.
Debugf
(
"getLocal %s"
,
key
)
rec
,
err
:=
dht
.
getRecordFromDatastore
(
mkDsKey
(
key
))
if
err
!=
nil
{
log
.
Warningf
(
"getLocal: %
v
"
,
err
.
Error
()
)
log
.
Warningf
(
"getLocal: %
s
"
,
err
)
return
nil
,
err
}
...
...
@@ -260,7 +260,7 @@ func (dht *IpfsDHT) putLocal(key string, rec *recpb.Record) error {
log
.
Debugf
(
"putLocal: %v %v"
,
key
,
rec
)
data
,
err
:=
proto
.
Marshal
(
rec
)
if
err
!=
nil
{
log
.
Warningf
(
"putLocal: %
v
"
,
err
.
Error
()
)
log
.
Warningf
(
"putLocal: %
s
"
,
err
)
return
err
}
...
...
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