Skip to content

Commit

Permalink
Fix AutoNAT service for private network
Browse files Browse the repository at this point in the history
  • Loading branch information
requilence committed Apr 25, 2019
1 parent c1bc202 commit 65ed040
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/node/libp2p/libp2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,14 @@ func AutoNATService(mctx helpers.MetricsCtx, lc fx.Lifecycle, cfg *config.Config
if !cfg.Swarm.EnableAutoNATService {
return nil
}
var opts []libp2p.Option

// collect private net option in case swarm.key is presented
opts, _, err := P2PPNet(repo)
if err != nil {
// swarm key exists but was failed to decode
return err
}

if cfg.Experimental.QUIC {
opts = append(opts, libp2p.DefaultTransports, libp2p.Transport(libp2pquic.NewTransport))
}
Expand Down

2 comments on commit 65ed040

@GitCop
Copy link

@GitCop GitCop commented on 65ed040 Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

@GitCop
Copy link

@GitCop GitCop commented on 65ed040 Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.