fix(peer_exchange): allow using as client without discv5 enabled

This commit is contained in:
Richard Ramos 2022-12-03 09:49:20 -04:00 committed by RichΛrd
parent 94d20ab122
commit b08ae4d7cc
1 changed files with 11 additions and 11 deletions

View File

@ -277,6 +277,7 @@ func Execute(options Options) {
if err = wakuNode.DiscV5().Start(); err != nil { if err = wakuNode.DiscV5().Start(); err != nil {
logger.Fatal("starting discovery v5", zap.Error(err)) logger.Fatal("starting discovery v5", zap.Error(err))
} }
}
// retrieve and connect to peer exchange peers // retrieve and connect to peer exchange peers
if options.PeerExchange.Enable && options.PeerExchange.Node != nil { if options.PeerExchange.Enable && options.PeerExchange.Node != nil {
@ -292,7 +293,6 @@ func Execute(options Options) {
} }
} }
} }
}
if len(options.Relay.Topics.Value()) == 0 { if len(options.Relay.Topics.Value()) == 0 {
options.Relay.Topics = *cli.NewStringSlice(relay.DefaultWakuTopic) options.Relay.Topics = *cli.NewStringSlice(relay.DefaultWakuTopic)