service/src/lib: Update authority discovery construction (#1563)

* service/src/lib: Update authority discovery construction

https://github.com/paritytech/substrate/pull/6760 introduces the concept
of an authority discovery `Service` allowing one to communicate with an
authority discovery `Worker`, e.g. to learn the `Multiaddr`s for a given
`AuthorityId`.

Along with the new `Service` structure it also alters the authority
discovery constructor to return both a worker and a service. This
commit adjusts the callside of the constructor, ignoring the `Service`
for now.

* "Update Substrate"

* Revert ""Update Substrate""

This reverts commit 04fb79c465f91b55422e22d4ea266f08f4072854.

* Update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Max Inden
2020-08-12 18:06:12 +02:00
committed by GitHub
parent e3c83e42d8
commit 7914847950
2 changed files with 139 additions and 139 deletions
+137 -137
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -477,7 +477,7 @@ pub fn new_full<RuntimeApi, Executor>(
Event::Dht(e) => Some(e), Event::Dht(e) => Some(e),
_ => None, _ => None,
}}).boxed(); }}).boxed();
let authority_discovery = authority_discovery::AuthorityDiscovery::new( let (authority_discovery_worker, _service) = authority_discovery::new_worker_and_service(
client.clone(), client.clone(),
network.clone(), network.clone(),
sentries, sentries,
@@ -486,7 +486,7 @@ pub fn new_full<RuntimeApi, Executor>(
prometheus_registry.clone(), prometheus_registry.clone(),
); );
task_manager.spawn_handle().spawn("authority-discovery", authority_discovery); task_manager.spawn_handle().spawn("authority-discovery-worker", authority_discovery_worker);
} }
} }