SimpleSlotWorker: Do not implement SlotWorker for all types implementing SimpleSlotWorker (#10934)

Because Rust currently doesn't support specialization, it prevents users from implementing
`SlotWorker` for their own types. This pr solves this by removing the generic implementation of
`SlotWorker` for `SimpleSlotWorker` and providing some wrapper type for that.
This commit is contained in:
Bastian Köcher
2022-03-02 10:03:10 +01:00
committed by GitHub
parent f3e9c0af04
commit c58271468a
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -518,7 +518,7 @@ where
let slot_worker = sc_consensus_slots::start_slot_worker(
babe_link.config.slot_duration(),
select_chain,
worker,
sc_consensus_slots::SimpleSlotWorkerToSlotWorker(worker),
sync_oracle,
create_inherent_data_providers,
can_author_with,