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
dms3
go-dms3-routing
Commits
d6e46688
Commit
d6e46688
authored
Aug 19, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmds: implement ipfs dht provide command
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
b9835f03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
dht/routing.go
dht/routing.go
+5
-0
No files found.
dht/routing.go
View file @
d6e46688
...
...
@@ -263,6 +263,10 @@ func (dht *IpfsDHT) Provide(ctx context.Context, key key.Key) error {
go
func
(
p
peer
.
ID
)
{
defer
wg
.
Done
()
log
.
Debugf
(
"putProvider(%s, %s)"
,
key
,
p
)
notif
.
PublishQueryEvent
(
ctx
,
&
notif
.
QueryEvent
{
Type
:
notif
.
FinalPeer
,
ID
:
p
,
})
err
:=
dht
.
sendMessage
(
ctx
,
p
,
mes
)
if
err
!=
nil
{
log
.
Debug
(
err
)
...
...
@@ -272,6 +276,7 @@ func (dht *IpfsDHT) Provide(ctx context.Context, key key.Key) error {
wg
.
Wait
()
return
nil
}
func
(
dht
*
IpfsDHT
)
makeProvRecord
(
skey
key
.
Key
)
(
*
pb
.
Message
,
error
)
{
pi
:=
pstore
.
PeerInfo
{
ID
:
dht
.
self
,
...
...
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