Commit c9532719 authored by Jeromy's avatar Jeromy

use correct protocol names for ipfs services

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent 233550e1
...@@ -31,7 +31,8 @@ import ( ...@@ -31,7 +31,8 @@ import (
var log = logging.Logger("dht") var log = logging.Logger("dht")
var ProtocolDHT protocol.ID = "/ipfs/dht" var ProtocolDHT protocol.ID = "/ipfs/kad/1.0.0"
var ProtocolDHTOld protocol.ID = "/ipfs/dht"
// NumBootstrapQueries defines the number of random dht queries to do to // NumBootstrapQueries defines the number of random dht queries to do to
// collect members of the routing table. // collect members of the routing table.
...@@ -85,6 +86,7 @@ func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT { ...@@ -85,6 +86,7 @@ func NewDHT(ctx context.Context, h host.Host, dstore ds.Batching) *IpfsDHT {
dht.ctx = ctx dht.ctx = ctx
h.SetStreamHandler(ProtocolDHT, dht.handleNewStream) h.SetStreamHandler(ProtocolDHT, dht.handleNewStream)
h.SetStreamHandler(ProtocolDHTOld, dht.handleNewStream)
dht.providers = providers.NewProviderManager(dht.ctx, dht.self, dstore) dht.providers = providers.NewProviderManager(dht.ctx, dht.self, dstore)
dht.proc.AddChild(dht.providers.Process()) dht.proc.AddChild(dht.providers.Process())
goprocessctx.CloseAfterContext(dht.proc, ctx) goprocessctx.CloseAfterContext(dht.proc, ctx)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment