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:
paritytech-polkadotsdk-templatebot[bot]
2025-02-20 15:29:47 +02:00
committed by GitHub
parent 3004222b11
commit a76e4bf0ed
18 changed files with 3430 additions and 2347 deletions
+3
View File
@@ -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());
})