client/authority-discovery: Append PeerId to Multiaddr at most once (#6933)

* client/authority-discovery/worker: Extract address getter

* client/authority-discovery: Test for no duplicate p2p components

* client/authority-discovery: Append PeerId to Multiaddr at most once

When collecting the addresses to be published for the local node,
`addresses_to_publish` adds the local nodes `PeerId` to each
`Multiaddr`. Before doing so, ensure the `Multiaddr` does not already
contain one.

* client/authority-discovery: Remove explicit return
This commit is contained in:
Max Inden
2020-08-24 09:37:32 +02:00
committed by GitHub
parent da13dc3c3f
commit 5c500aa783
4 changed files with 97 additions and 19 deletions
@@ -19,6 +19,7 @@ prost-build = "0.6.1"
bytes = "0.5.0"
codec = { package = "parity-scale-codec", default-features = false, version = "1.3.4" }
derive_more = "0.99.2"
either = "1.5.3"
futures = "0.3.4"
futures-timer = "3.0.1"
libp2p = { version = "0.24.0", default-features = false, features = ["kad"] }