diff --git a/client/consensus/aura/src/import_queue.rs b/client/consensus/aura/src/import_queue.rs index d5cf40f33359e..0973b33d402e6 100644 --- a/client/consensus/aura/src/import_queue.rs +++ b/client/consensus/aura/src/import_queue.rs @@ -186,6 +186,19 @@ where &mut self, mut block: BlockImportParams, ) -> Result<(BlockImportParams, Option)>>), String> { + // When importing whole state we don't verify the seal as the state is not available. + if block.with_state() { + return Ok((block, Default::default())) + } + + // Skip checks that include execution, if being told so. + // + // This is done for example when gap syncing and it is expected that the block after the gap + // was checked/chosen properly, e.g. by warp syncing to this block using a finality proof. + if block.state_action.skip_execution_checks() { + return Ok((block, Default::default())) + } + let hash = block.header.hash(); let parent_hash = *block.header.parent_hash(); let authorities = authorities(