Fix warp sync (#12281)

This commit is contained in:
Arkadiy Paronyan
2022-09-16 16:16:37 +02:00
committed by GitHub
parent d9a4d835d1
commit 86b122d7a7
4 changed files with 50 additions and 33 deletions
@@ -153,6 +153,18 @@ pub enum StateAction<Block: BlockT, Transaction> {
Skip,
}
impl<Block: BlockT, Transaction> StateAction<Block, Transaction> {
/// Check if execution checks that require runtime calls should be skipped.
pub fn skip_execution_checks(&self) -> bool {
match self {
StateAction::ApplyChanges(_) |
StateAction::Execute |
StateAction::ExecuteIfPossible => false,
StateAction::Skip => true,
}
}
}
/// Data required to import a Block.
#[non_exhaustive]
pub struct BlockImportParams<Block: BlockT, Transaction> {