fix: use pre-defined relays for autorelay
Unfortunately, we don't currently have any way to pick out good relays from bad. That means we keep searching, trying bad relays, searching some more, trying _the same relays_, etc. until we randomly find 3 good stable relays. In practice, this means we just keep searching forever and keep thrashing the DHT. see https://github.com/libp2p/go-libp2p/issues/694
Steven Allen committed
Jan 17, 2020 at 06:28 UTC
1045a31e1d4151f90f58d71340b621bcc087d72b
1 file changed
+1
-1
core/node/libp2p/relay.go
+1
-1
@@ -21,4 +21,4 @@ func Relay(disable, enableHop bool) func() (opts Libp2pOpts, err error) {
21
}
22
}
23
24
-var AutoRealy = simpleOpt(libp2p.EnableAutoRelay())
24
+var AutoRealy = simpleOpt(libp2p.ChainOptions(libp2p.EnableAutoRelay(), libp2p.DefaultStaticRelays()))