mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-10 01:43:08 +00:00
feat: rendezvous pt1
This commit is contained in:
parent
682be9b1e5
commit
5d89893dfb
16
waku/node.go
16
waku/node.go
@ -173,6 +173,22 @@ var rootCmd = &cobra.Command{
|
||||
nodeOpts = append(nodeOpts, node.WithRendezvousServer())
|
||||
}
|
||||
|
||||
if enableRendezvous && len(rendezvousPeerIds) > 0 {
|
||||
var peers []peer.ID
|
||||
for _, r := range rendezvousPeerIds {
|
||||
peerId, err := peer.Decode(r)
|
||||
if err != nil {
|
||||
checkError(err, "Rendezvous")
|
||||
}
|
||||
peers = append(peers, peerId)
|
||||
}
|
||||
nodeOpts = append(nodeOpts, node.WithRendezvous(peers, pubsub.WithDiscoveryOpts(libp2pdisc.TTL(time.Duration(20)*time.Second))))
|
||||
}
|
||||
|
||||
if enableRendezvousServer {
|
||||
nodeOpts = append(nodeOpts, node.WithRendezvousServer())
|
||||
}
|
||||
|
||||
if wakuFilter {
|
||||
nodeOpts = append(nodeOpts, node.WithWakuFilter())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user