bug: peerStore should update ENRs of existing peers in case they change #2817
Labels
bug
Something isn't working
effort/hours
Estimated to be completed in a few hours
good first issue
Good for newcomers
Problem
If a peer is added to the peer store and it dynamically changes its ENR, our peer store won't update it. It will currently check that the multiaddress and public key are matched to the peerId and that some ENR is saved. If so, we exit early.
This happens in the following lines in
addPeer()
:nwaku/waku/node/peer_manager/peer_manager.nim
Lines 128 to 133 in 93e9ba2
But if ENR changed, we won't update it and still exit early.
We should check if the ENR has changed and if so, update it in the peer store.
The text was updated successfully, but these errors were encountered: