From 0faa54c9fc0105a43238e76ede3fa817d7f4bcf5 Mon Sep 17 00:00:00 2001 From: Mobin Hosseini Date: Fri, 10 Apr 2020 18:11:45 +0300 Subject: [PATCH] Update host.go Recent changes break the DHT peer discovery when testing on local and private nets. https://github.com/libp2p/go-libp2p-kad-dht/issues/569 --- libp2p-host/host.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p-host/host.go b/libp2p-host/host.go index 6d092de..d5db19c 100644 --- a/libp2p-host/host.go +++ b/libp2p-host/host.go @@ -73,7 +73,7 @@ func main() { libp2p.NATPortMap(), // Let this host use the DHT to find other hosts libp2p.Routing(func(h host.Host) (routing.PeerRouting, error) { - idht, err = dht.New(ctx, h) + idht, err = dht.New(ctx, h, dht.Mode(dht.ModeServer)) return idht, err }), // Let this host use relays and advertise itself on relays if