chore: use available peers rather than connected peers, since in case of lightMode we don't connect to all boot nodes
This commit is contained in:
parent
500755110a
commit
92685e5a7b
|
@ -566,9 +566,9 @@ func (w *Waku) runPeerExchangeLoop() {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
w.logger.Info("Running peer exchange loop")
|
w.logger.Info("Running peer exchange loop")
|
||||||
|
|
||||||
connectedPeers := w.node.Host().Network().Peers()
|
availablePeers := w.node.Host().Peerstore().Peers()
|
||||||
peersWithRelay := 0
|
peersWithRelay := 0
|
||||||
for _, p := range connectedPeers {
|
for _, p := range availablePeers {
|
||||||
supportedProtocols, err := w.node.Host().Peerstore().SupportsProtocols(p, relay.WakuRelayID_v200)
|
supportedProtocols, err := w.node.Host().Peerstore().SupportsProtocols(p, relay.WakuRelayID_v200)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue