Aura and Slots refactoring (#8386)

* Make slot duration being exposed as `Duration` to the outside

* Some slot info love

* Add `build_aura_worker` utility function

* Copy copy copy
This commit is contained in:
Bastian Köcher authored and GitHub committed 2021-03-17 23:25:58 +00:00
1 parent 0d6884b919
commit 15e15e7d8e
17 files changed
+188 -68

No files matched your search

@@ -242,8 +242,8 @@ impl AllowedSlots {
#[cfg(feature = "std")]
impl sp_consensus::SlotData for BabeGenesisConfiguration {
fn slot_duration(&self) -> u64 {
self.slot_duration
fn slot_duration(&self) -> std::time::Duration {
std::time::Duration::from_millis(self.slot_duration)
}
const SLOT_KEY: &'static [u8] = b"babe_configuration";