fix: missing identity

This commit is contained in:
Richard Ramos 2021-10-15 15:51:24 -04:00
parent a956684f48
commit b661a4b9bc
No known key found for this signature in database
GPG Key ID: 80D4B01265FDFE8F
1 changed files with 3 additions and 0 deletions

View File

@ -355,12 +355,14 @@ func printListeningAddresses(ctx context.Context, nodeOpts []node.WakuNodeOption
}
var libp2pOpts []config.Option
libp2pOpts = append(libp2pOpts, params.Identity())
if options.AdvertiseAddress != "" {
advertiseAddress, err := net.ResolveTCPAddr("tcp", fmt.Sprintf("%s:%d", options.AdvertiseAddress, options.Port))
if err != nil {
panic(err)
}
libp2pOpts = append(libp2pOpts, libp2p.AddrsFactory(func([]multiaddr.Multiaddr) []multiaddr.Multiaddr {
addr, _ := manet.FromNetAddr(advertiseAddress)
var result []multiaddr.Multiaddr
@ -376,6 +378,7 @@ func printListeningAddresses(ctx context.Context, nodeOpts []node.WakuNodeOption
}
libp2pOpts = append(libp2pOpts, libp2p.ListenAddrs(params.MultiAddresses()...))
h, err := libp2p.New(ctx, libp2pOpts...)
if err != nil {
panic(err)