Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sam-refactor-new-be…
Browse files Browse the repository at this point in the history
…nchmarking
  • Loading branch information
parity-processbot committed Jan 26, 2023
2 parents a98b41e + 65d1d03 commit 73462d3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions client/consensus/aura/src/import_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,15 @@ where
&mut self,
mut block: BlockImportParams<B, ()>,
) -> Result<(BlockImportParams<B, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), 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.
// Skip checks that include execution, if being told so or when importing only state.
//
// 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() {
// Or when we are importing state only and can not verify the seal.
if block.with_state() || block.state_action.skip_execution_checks() {
// When we are importing only the state of a block, it will be the best block.
block.fork_choice = Some(ForkChoiceStrategy::Custom(block.with_state()));

return Ok((block, Default::default()))
}

Expand Down

0 comments on commit 73462d3

Please sign in to comment.