mirror of https://github.com/status-im/go-waku.git
fix: missing identity
This commit is contained in:
parent
a956684f48
commit
b661a4b9bc
|
@ -355,12 +355,14 @@ func printListeningAddresses(ctx context.Context, nodeOpts []node.WakuNodeOption
|
||||||
}
|
}
|
||||||
|
|
||||||
var libp2pOpts []config.Option
|
var libp2pOpts []config.Option
|
||||||
|
libp2pOpts = append(libp2pOpts, params.Identity())
|
||||||
|
|
||||||
if options.AdvertiseAddress != "" {
|
if options.AdvertiseAddress != "" {
|
||||||
advertiseAddress, err := net.ResolveTCPAddr("tcp", fmt.Sprintf("%s:%d", options.AdvertiseAddress, options.Port))
|
advertiseAddress, err := net.ResolveTCPAddr("tcp", fmt.Sprintf("%s:%d", options.AdvertiseAddress, options.Port))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
libp2pOpts = append(libp2pOpts, libp2p.AddrsFactory(func([]multiaddr.Multiaddr) []multiaddr.Multiaddr {
|
libp2pOpts = append(libp2pOpts, libp2p.AddrsFactory(func([]multiaddr.Multiaddr) []multiaddr.Multiaddr {
|
||||||
addr, _ := manet.FromNetAddr(advertiseAddress)
|
addr, _ := manet.FromNetAddr(advertiseAddress)
|
||||||
var result []multiaddr.Multiaddr
|
var result []multiaddr.Multiaddr
|
||||||
|
@ -376,6 +378,7 @@ func printListeningAddresses(ctx context.Context, nodeOpts []node.WakuNodeOption
|
||||||
}
|
}
|
||||||
|
|
||||||
libp2pOpts = append(libp2pOpts, libp2p.ListenAddrs(params.MultiAddresses()...))
|
libp2pOpts = append(libp2pOpts, libp2p.ListenAddrs(params.MultiAddresses()...))
|
||||||
|
|
||||||
h, err := libp2p.New(ctx, libp2pOpts...)
|
h, err := libp2p.New(ctx, libp2pOpts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
Loading…
Reference in New Issue