Skip to content

Commit

Permalink
fix peerStore naming
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer committed Sep 27, 2024
1 parent 2e36ea4 commit 139bf9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions waku/node/peer_manager/peer_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -438,14 +438,14 @@ proc onPeerEvent(pm: PeerManager, peerId: PeerId, event: PeerEvent) {.async.} =
## Check max allowed in-relay peers
let inRelayPeers = pm.connectedPeers(WakuRelayCodec)[0]
if inRelayPeers.len > pm.inRelayPeersTarget and
pm.peerStore.hasPeer(peerId, WakuRelayCodec):
pm.wakuPeerStore.hasPeer(peerId, WakuRelayCodec):
debug "disconnecting relay peer because reached max num in-relay peers",
peerId = peerId,
inRelayPeers = inRelayPeers.len,
inRelayPeersTarget = pm.inRelayPeersTarget

await pm.switch.disconnect(peerId)
pm.peerStore.delete(peerId)
pm.wakuPeerStore.delete(peerId)

## Apply max ip colocation limit
if (let ip = pm.getPeerIp(peerId); ip.isSome()):
Expand Down

0 comments on commit 139bf9a

Please sign in to comment.