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

Commit

Permalink
Do not verify on state import for relay chain verifier (#2140)
Browse files Browse the repository at this point in the history
* Skip verification on state import

* Actually use existing variables

* Merge checks
  • Loading branch information
skunert authored Jan 26, 2023
1 parent 08b2582 commit ebc73fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 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,14 @@ where
&mut self,
mut block_params: BlockImportParams<Block, ()>,
) -> Result<(BlockImportParams<Block, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String> {
// 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_params.state_action.skip_execution_checks() || block_params.with_state() {
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

0 comments on commit ebc73fe

Please sign in to comment.