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
1b4f4076
Commit
1b4f4076
authored
Nov 14, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add errors and such to log failure messages
parent
2020aa5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
providers/providers.go
providers/providers.go
+3
-3
No files found.
providers/providers.go
View file @
1b4f4076
...
@@ -214,18 +214,18 @@ func (pm *ProviderManager) getProvKeys() (func() (*cid.Cid, bool), error) {
...
@@ -214,18 +214,18 @@ func (pm *ProviderManager) getProvKeys() (func() (*cid.Cid, bool), error) {
for
e
:=
range
res
.
Next
()
{
for
e
:=
range
res
.
Next
()
{
parts
:=
strings
.
Split
(
e
.
Key
,
"/"
)
parts
:=
strings
.
Split
(
e
.
Key
,
"/"
)
if
len
(
parts
)
!=
4
{
if
len
(
parts
)
!=
4
{
log
.
Warning
(
"incorrectly formatted provider entry in datastore
"
)
log
.
Warning
f
(
"incorrectly formatted provider entry in datastore
: %s"
,
e
.
Key
)
continue
continue
}
}
decoded
,
err
:=
base32
.
RawStdEncoding
.
DecodeString
(
parts
[
2
])
decoded
,
err
:=
base32
.
RawStdEncoding
.
DecodeString
(
parts
[
2
])
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Warning
(
"error decoding base32 provider key
"
)
log
.
Warning
(
"error decoding base32 provider key
: %s: %s"
,
parts
[
2
],
err
)
continue
continue
}
}
c
,
err
:=
cid
.
Cast
(
decoded
)
c
,
err
:=
cid
.
Cast
(
decoded
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Warning
(
"error casting key to cid from datastore key
"
)
log
.
Warning
(
"error casting key to cid from datastore key
: %s"
,
err
)
continue
continue
}
}
...
...
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