Marco Munizaga c4f7877853
protocols/identify: Check multiaddr has valid peer id component prior to caching (#2338)
Check multiaddr has valid peer id component or none at all. We don't want to
cache a multiaddr with a purposely wrong multiaddr. e.g. something that ends
with .../p2p/some-other-peer. While this should fail to dial because we [check
this before
dialing](https://github.com/libp2p/rust-libp2p/blob/master/core/src/connection/pool/concurrent_dial.rs#L144),
it's better to not cache this in the first place.
2021-11-16 13:05:47 +01:00
..
2021-08-11 13:12:12 +02:00