rust-libp2p icon indicating copy to clipboard operation
rust-libp2p copied to clipboard

feat(rz): emit `NewExternalAddrOfPeer` when discovering peers

Open dariusc93 opened this issue 1 year ago • 1 comments

Description

  • Resolves #5105

Notes & open questions

  1. Do we want to check to determine if a peer has been previously discovered so we dont return the event for the same peer and address or should we continue to emit the event event even if the peer has been previously discovered and registration havent expired?

Change checklist

  • [ ] I have performed a self-review of my own code
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] A changelog entry has been made in the appropriate crates

dariusc93 avatar Feb 02 '24 06:02 dariusc93

Do we want to check to determine if a peer has been previously discovered so we dont return the event for the same peer and address or should we continue to emit the event event even if the peer has been previously discovered and registration havent expired?

Yeah, I think we should check that by subscribing to the relevant events and only emitting an event if we find a new peer. That way, event traffic between the behaviours is reduced.

thomaseizinger avatar Feb 14 '24 07:02 thomaseizinger