mirror of
https://github.com/pezkuwichain/pez-minimal-template.git
synced 2026-04-22 03:18:01 +00:00
Update the minimal template to stable2412 (#21)
This synchronizes the template to the stable2412 branch. --------- Signed-off-by: Iulian Barbu <iulian.barbu@parity.io> Co-authored-by: iulianbarbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: Iulian Barbu <iulian.barbu@parity.io>
This commit is contained in:
committed by
GitHub
parent
3004222b11
commit
a76e4bf0ed
@@ -21,6 +21,7 @@ use polkadot_sdk::{sc_cli::RunCmd, *};
|
||||
pub enum Consensus {
|
||||
ManualSeal(u64),
|
||||
InstantSeal,
|
||||
None,
|
||||
}
|
||||
|
||||
impl std::str::FromStr for Consensus {
|
||||
@@ -31,6 +32,8 @@ impl std::str::FromStr for Consensus {
|
||||
Consensus::InstantSeal
|
||||
} else if let Some(block_time) = s.strip_prefix("manual-seal-") {
|
||||
Consensus::ManualSeal(block_time.parse().map_err(|_| "invalid block time")?)
|
||||
} else if s.to_lowercase() == "none" {
|
||||
Consensus::None
|
||||
} else {
|
||||
return Err("incorrect consensus identifier".into());
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user