mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
QSP-25 Only Enable Relay if Flag Provided (#6386)
* only add relay if flag is on * Merge branch 'master' into qsp-25 * Merge refs/heads/master into qsp-25 * Merge refs/heads/master into qsp-25
This commit is contained in:
parent
a9c1d25a35
commit
ac77a5c054
@ -32,7 +32,6 @@ func (s *Service) buildOptions(ip net.IP, priKey *ecdsa.PrivateKey) []libp2p.Opt
|
||||
}
|
||||
options := []libp2p.Option{
|
||||
privKeyOption(priKey),
|
||||
libp2p.EnableRelay(),
|
||||
libp2p.ListenAddrs(listen),
|
||||
libp2p.UserAgent(version.GetBuildData()),
|
||||
libp2p.ConnectionGater(s),
|
||||
@ -46,6 +45,7 @@ func (s *Service) buildOptions(ip net.IP, priKey *ecdsa.PrivateKey) []libp2p.Opt
|
||||
}
|
||||
if cfg.RelayNodeAddr != "" {
|
||||
options = append(options, libp2p.AddrsFactory(withRelayAddrs(cfg.RelayNodeAddr)))
|
||||
options = append(options, libp2p.EnableRelay())
|
||||
}
|
||||
if cfg.HostAddress != "" {
|
||||
options = append(options, libp2p.AddrsFactory(func(addrs []ma.Multiaddr) []ma.Multiaddr {
|
||||
|
Loading…
Reference in New Issue
Block a user