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 authored and GitHub committed 2022-03-02 09:03:10 +00:00
1 parent f3e9c0af04
commit c58271468a
3 files changed
+13 -6

No files matched your search

+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,