mirror of
https://github.com/libp2p/go-libp2p.git
synced 2025-11-03 10:50:56 +08:00
chore: remove unnecessary conversions (#2680)
This commit is contained in:
committed by
GitHub
parent
5286cdafab
commit
c6e99f10af
@@ -349,7 +349,7 @@ func EnableAutoRelayWithPeerSource(peerSource autorelay.PeerSource, opts ...auto
|
||||
// forcing the local node to believe it is reachable externally.
|
||||
func ForceReachabilityPublic() Option {
|
||||
return func(cfg *Config) error {
|
||||
public := network.Reachability(network.ReachabilityPublic)
|
||||
public := network.ReachabilityPublic
|
||||
cfg.AutoNATConfig.ForceReachability = &public
|
||||
return nil
|
||||
}
|
||||
@@ -359,7 +359,7 @@ func ForceReachabilityPublic() Option {
|
||||
// forceing the local node to believe it is behind a NAT and not reachable externally.
|
||||
func ForceReachabilityPrivate() Option {
|
||||
return func(cfg *Config) error {
|
||||
private := network.Reachability(network.ReachabilityPrivate)
|
||||
private := network.ReachabilityPrivate
|
||||
cfg.AutoNATConfig.ForceReachability = &private
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user