net/discovery: Do not propagate external addr with different peerIDs (#6380)
This PR ensures that external addresses with different PeerIDs are not propagated to the higher layer of the network code. While at it, this ensures that libp2p only adds the `/p2p/peerid` part to the discovered address if it does not contain it already. This is a followup from: - https://github.com/paritytech/polkadot-sdk/pull/6298 cc @paritytech/networking --------- Signed-off-by:Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by:
Dmitry Markin <dmitry@markin.tech>
Showing
- prdoc/pr_6380.prdoc 11 additions, 0 deletionsprdoc/pr_6380.prdoc
- substrate/client/network/src/discovery.rs 17 additions, 5 deletionssubstrate/client/network/src/discovery.rs
- substrate/client/network/src/litep2p/discovery.rs 41 additions, 17 deletionssubstrate/client/network/src/litep2p/discovery.rs
- substrate/client/network/src/litep2p/mod.rs 1 addition, 0 deletionssubstrate/client/network/src/litep2p/mod.rs
Please register or sign in to comment