mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
babe, aura, pow: only call check_inherents if authoring version is compatible (#6862)
* pow: check can_author_with before calling check_inherents * babe: check can_author_with before calling check_inherents * aura: check can_author_with before calling check_inherents * Fix node and node template compile * Add missing comma * Put each parameter on its own line * Add debug print * Fix line width too long * Fix pow line width issue
This commit is contained in:
@@ -247,6 +247,15 @@ impl<Block: BlockT> CanAuthorWith<Block> for AlwaysCanAuthor {
|
||||
}
|
||||
}
|
||||
|
||||
/// Never can author.
|
||||
pub struct NeverCanAuthor;
|
||||
|
||||
impl<Block: BlockT> CanAuthorWith<Block> for NeverCanAuthor {
|
||||
fn can_author_with(&self, _: &BlockId<Block>) -> Result<(), String> {
|
||||
Err("Authoring is always disabled.".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
/// A type from which a slot duration can be obtained.
|
||||
pub trait SlotData {
|
||||
/// Gets the slot duration.
|
||||
|
||||
Reference in New Issue
Block a user