Fix warp sync (#12281)

This commit is contained in:
Arkadiy Paronyan authored and GitHub committed 2022-09-16 14:16:37 +00:00
1 parent d9a4d835d1
commit 86b122d7a7
4 files changed
+50 -33

No files matched your search

@@ -225,15 +225,16 @@ where
inherent_data.aura_replace_inherent_data(slot);
// skip the inherents verification if the runtime API is old.
if self
.client
.runtime_api()
.has_api_with::<dyn BlockBuilderApi<B>, _>(
&BlockId::Hash(parent_hash),
|v| v >= 2,
)
.map_err(|e| e.to_string())?
// skip the inherents verification if the runtime API is old or not expected to
// exist.
if !block.state_action.skip_execution_checks() &&
self.client
.runtime_api()
.has_api_with::<dyn BlockBuilderApi<B>, _>(
&BlockId::Hash(parent_hash),
|v| v >= 2,
)
.map_err(|e| e.to_string())?
{
self.check_inherents(
new_block.clone(),