Use peerstore instead of network

This commit is contained in:
Vitaliy Vlasov 2021-09-18 17:19:19 +03:00
parent a3c7102a34
commit 67ac969a65
1 changed files with 5 additions and 1 deletions

View File

@ -780,7 +780,11 @@ func (w *WakuNode) startKeepAlive(t time.Duration) {
for {
select {
case <-ticker.C:
for _, p := range w.host.Network().Peers() {
for _, p := range w.host.Peerstore().Peers() {
if p == w.host.ID() {
log.Info("###PING skip ", p)
continue
}
mu.Lock()
_, ok := peerMap[p]
mu.Unlock()