client/authority-discovery: Remove sentry node logic (#7368)

* client/authority-discovery: Remove sentry node logic

The notion of sentry nodes has been deprecated (see [1] for details).
This commit removes support for sentry nodes in the
`client/authority-discovery` module.

While removing `Role::Sentry` this commit also introduces
`Role::Discover`, allowing a node to discover addresses of authorities
without publishing ones own addresses. This will be needed in Polkadot
for collator nodes.

[1] https://github.com/paritytech/substrate/issues/6845

* client/authority-discovery/service: Improve PeerId comment
This commit is contained in:
Max Inden
2020-10-26 11:06:56 +01:00
committed by GitHub
parent 52a49e7f51
commit 653868c01e
6 changed files with 69 additions and 214 deletions
@@ -55,9 +55,8 @@ fn get_addresses_and_authority_id() {
let (mut worker, mut service) = new_worker_and_service(
test_api,
network.clone(),
vec![],
Box::pin(dht_event_rx),
Role::Authority(key_store.into()),
Role::PublishAndDiscover(key_store.into()),
None,
);
worker.inject_addresses(remote_authority_id.clone(), vec![remote_addr.clone()]);