Skip to content

Commit

Permalink
fix: use pre-defined relays for autorelay
Browse files Browse the repository at this point in the history
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 libp2p/go-libp2p#694
  • Loading branch information
Stebalien committed Jan 17, 2020
1 parent 3cdd8c9 commit 631b6e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/node/libp2p/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ func Relay(disable, enableHop bool) func() (opts Libp2pOpts, err error) {
}
}

var AutoRealy = simpleOpt(libp2p.EnableAutoRelay())
var AutoRealy = simpleOpt(libp2p.ChainOptions(libp2p.EnableAutoRelay(), libp2p.DefaultStaticRelays()))

0 comments on commit 631b6e6

Please sign in to comment.