Skip to content

Commit

Permalink
fix(network): relay add opt discovery to add known relay host
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Mar 8, 2019
1 parent 6b1ce91 commit df68043
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/network/config/config.go
Expand Up @@ -118,11 +118,10 @@ func (cfg *Config) Apply(ctx context.Context, opts ...Option) error {
}

// relay
libp2pOpts = append(libp2pOpts, libp2p.EnableAutoRelay())
if cfg.HOP {
libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(circuit.OptActive, circuit.OptHop))
} else {
libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(circuit.OptActive))
libp2pOpts = append(libp2pOpts, libp2p.EnableRelay(circuit.OptActive, circuit.OptDiscovery))
}

// private network
Expand Down

0 comments on commit df68043

Please sign in to comment.