mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Remove depenendcy on sc-consensus-slots (#4321)
This commit is contained in:
committed by
Gavin Wood
parent
a868fcbbbf
commit
638e32fa8f
@@ -181,3 +181,20 @@ impl<Block: BlockT> CanAuthorWith<Block> for AlwaysCanAuthor {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// A type from which a slot duration can be obtained.
|
||||
pub trait SlotData {
|
||||
/// Gets the slot duration.
|
||||
fn slot_duration(&self) -> u64;
|
||||
|
||||
/// The static slot key
|
||||
const SLOT_KEY: &'static [u8];
|
||||
}
|
||||
|
||||
impl SlotData for u64 {
|
||||
fn slot_duration(&self) -> u64 {
|
||||
*self
|
||||
}
|
||||
|
||||
const SLOT_KEY: &'static [u8] = b"aura_slot_duration";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user