Skip to content

Commit

Permalink
chore: update the pr
Browse files Browse the repository at this point in the history
  • Loading branch information
darshankabariya committed Jul 10, 2024
1 parent c1657cf commit b05d528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion waku/node/peer_manager/waku_peer_store.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import
std/[tables, sequtils, sets, options, strutils, times, random, math],
chronos,
chronos/timer,
eth/p2p/discoveryv5/enr,
libp2p/builders,
libp2p/peerstore
Expand Down Expand Up @@ -144,7 +145,7 @@ 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(initDuration(hours = 3))
let threshold = Moment.fromNow(millis(2*60*60*1000))
return peerStore.peers.filterIt(
(it.connectedness == CanConnect or it.connectedness == Connected) and
(it.lastSuccessfulConn < threshold)
Expand Down
1 change: 0 additions & 1 deletion waku/waku_peer_exchange/protocol.nim
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ proc respond(
proc getEnrsFromCache(
wpx: WakuPeerExchange, numPeers: uint64
): seq[enr.Record] {.gcsafe.} =
wpx.updatePxEnrCache()
if wpx.enrCache.len() == 0:
debug "peer exchange ENR cache is empty"
return @[]
Expand Down

0 comments on commit b05d528

Please sign in to comment.