Skip to content

Commit

Permalink
resolve incremental failure
Browse files Browse the repository at this point in the history
  • Loading branch information
darshankabariya committed Jul 10, 2024
1 parent b05d528 commit 7520eca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions waku/node/peer_manager/waku_peer_store.nim
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ proc getPeersByProtocol*(peerStore: PeerStore, proto: string): seq[RemotePeerInf
return peerStore.peers.filterIt(it.protocols.contains(proto))

proc getReachablePeers*(peerStore: PeerStore): seq[RemotePeerInfo] =
let threshold = Moment.fromNow(millis(2*60*60*1000))
let threshold = Moment.fromNow(millis(-3*60*60*1000))
return peerStore.peers.filterIt(
(it.connectedness == CanConnect or it.connectedness == Connected) and
(it.lastSuccessfulConn < threshold)
(it.lastSuccessfulConn > threshold)
)

proc getPeersByShard*(
Expand Down

0 comments on commit 7520eca

Please sign in to comment.