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

Aura: Fix warp syncing #13221

Merged
merged 2 commits into from
Jan 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions client/consensus/aura/src/import_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,14 @@ 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.
// Or when we are importing state only and can not verify the seal.
if block.state_action.skip_execution_checks() {
block.fork_choice = Some(ForkChoiceStrategy::Custom(false));

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

Expand Down