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
1bd8a86c
Commit
1bd8a86c
authored
Mar 20, 2016
by
Michael Muré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean deprecated Key.Pretty()
License: MIT Signed-off-by:
Michael Muré
<
batolettre@gmail.com
>
parent
17edbc07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
handlers.go
handlers.go
+2
-2
pb/message.go
pb/message.go
+1
-1
No files found.
handlers.go
View file @
1bd8a86c
...
...
@@ -210,7 +210,7 @@ func (dht *IpfsDHT) handleGetProviders(ctx context.Context, p peer.ID, pmes *pb.
resp
:=
pb
.
NewMessage
(
pmes
.
GetType
(),
pmes
.
GetKey
(),
pmes
.
GetClusterLevel
())
key
:=
key
.
Key
(
pmes
.
GetKey
())
lm
[
"key"
]
=
func
()
interface
{}
{
return
key
.
Pretty
()
}
lm
[
"key"
]
=
func
()
interface
{}
{
return
key
.
B58String
()
}
// debug logging niceness.
reqDesc
:=
fmt
.
Sprintf
(
"%s handleGetProviders(%s, %s): "
,
dht
.
self
,
p
,
key
)
...
...
@@ -254,7 +254,7 @@ func (dht *IpfsDHT) handleAddProvider(ctx context.Context, p peer.ID, pmes *pb.M
defer
log
.
EventBegin
(
ctx
,
"handleAddProvider"
,
lm
)
.
Done
()
key
:=
key
.
Key
(
pmes
.
GetKey
())
lm
[
"key"
]
=
func
()
interface
{}
{
return
key
.
Pretty
()
}
lm
[
"key"
]
=
func
()
interface
{}
{
return
key
.
B58String
()
}
log
.
Debugf
(
"%s adding %s as a provider for '%s'
\n
"
,
dht
.
self
,
p
,
key
)
...
...
pb/message.go
View file @
1bd8a86c
...
...
@@ -143,7 +143,7 @@ func (m *Message) Loggable() map[string]interface{} {
return
map
[
string
]
interface
{}{
"message"
:
map
[
string
]
string
{
"type"
:
m
.
Type
.
String
(),
"key"
:
key
.
Key
(
m
.
GetKey
())
.
Pretty
(),
"key"
:
key
.
Key
(
m
.
GetKey
())
.
B58String
(),
},
}
}
...
...
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