Companion for paritytech/substrate#13551 (#2278)

* Companion for paritytech/substrate#13551

* update lockfile for {"substrate", "polkadot"}

---------

Co-authored-by: parity-processbot <>
This commit is contained in:
André Silva
2023-03-07 11:57:49 +00:00
committed by GitHub
parent 723d409264
commit 4831e96de8
7 changed files with 269 additions and 276 deletions
+1 -2
View File
@@ -140,7 +140,6 @@ where
async fn import_block(
&mut self,
mut params: sc_consensus::BlockImportParams<Block, Self::Transaction>,
cache: std::collections::HashMap<sp_consensus::CacheKeyId, Vec<u8>>,
) -> Result<sc_consensus::ImportResult, Self::Error> {
// Blocks are stored within the backend by using POST hash.
let hash = params.post_hash();
@@ -158,7 +157,7 @@ where
monitor.release_mutex()
});
let res = self.inner.import_block(params, cache).await?;
let res = self.inner.import_block(params).await?;
if let (Some(mut monitor_lock), ImportResult::Imported(_)) = (maybe_lock, &res) {
let mut monitor = monitor_lock.upgrade();
@@ -456,7 +456,7 @@ where
block_import_params.fork_choice = Some(ForkChoiceStrategy::Custom(true));
block_import_params.import_existing = true;
if let Err(err) = (&*parachain).import_block(block_import_params, Default::default()).await {
if let Err(err) = (&*parachain).import_block(block_import_params).await {
tracing::warn!(
target: LOG_TARGET,
block_hash = ?hash,
+2 -2
View File
@@ -248,7 +248,7 @@ async fn import_block<I: BlockImport<Block>>(
block_import_params.body = Some(body);
block_import_params.post_digests.push(post_digest);
importer.import_block(block_import_params, Default::default()).await.unwrap();
importer.import_block(block_import_params).await.unwrap();
}
fn import_block_sync<I: BlockImport<Block>>(
@@ -508,7 +508,7 @@ fn follow_new_best_sets_best_after_it_is_imported() {
block_import_params.body = Some(body);
// Now import the unkown block to make it "known"
client.import_block(block_import_params, Default::default()).await.unwrap();
client.import_block(block_import_params).await.unwrap();
loop {
Delay::new(Duration::from_millis(100)).await;