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

Do not verify on state import for relay chain verifier #2140

Merged
Merged
Changes from 3 commits
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
12 changes: 12 additions & 0 deletions client/consensus/relay-chain/src/import_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ where
&mut self,
mut block_params: BlockImportParams<Block, ()>,
) -> Result<(BlockImportParams<Block, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String> {
if block_params.with_state() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit (feel free to ignore). In this new PR we've grouped the checks together. If you like we can do the same here .

return Ok((block_params, 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_params.state_action.skip_execution_checks() {
return Ok((block_params, Default::default()))
}

if let Some(inner_body) = block_params.body.take() {
let inherent_data_providers = self
.create_inherent_data_providers
Expand Down