consensus: remove caching functionality from block import pipeline (#13551)

* consensus: remove caching functionality from block import pipeline

* client: update docs on Verifier::verify

* node: fix block production benchmark
This commit is contained in:
André Silva
2023-03-07 11:19:19 +00:00
committed by GitHub
parent d86a32630b
commit 13b0f24abd
29 changed files with 103 additions and 214 deletions
@@ -17,7 +17,6 @@
//! Client extension for tests.
use codec::alloc::collections::hash_map::HashMap;
use sc_client_api::{backend::Finalizer, client::BlockBackend};
use sc_consensus::{BlockImport, BlockImportParams, ForkChoiceStrategy};
use sc_service::client::Client;
@@ -100,7 +99,7 @@ where
import.body = Some(extrinsics);
import.fork_choice = Some(ForkChoiceStrategy::LongestChain);
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
async fn import_as_best(
@@ -113,7 +112,7 @@ where
import.body = Some(extrinsics);
import.fork_choice = Some(ForkChoiceStrategy::Custom(true));
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
async fn import_as_final(
@@ -127,7 +126,7 @@ where
import.finalized = true;
import.fork_choice = Some(ForkChoiceStrategy::Custom(true));
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
async fn import_justified(
@@ -143,7 +142,7 @@ where
import.finalized = true;
import.fork_choice = Some(ForkChoiceStrategy::LongestChain);
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
}
@@ -162,7 +161,7 @@ where
import.body = Some(extrinsics);
import.fork_choice = Some(ForkChoiceStrategy::LongestChain);
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
async fn import_as_best(
@@ -175,7 +174,7 @@ where
import.body = Some(extrinsics);
import.fork_choice = Some(ForkChoiceStrategy::Custom(true));
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
async fn import_as_final(
@@ -189,7 +188,7 @@ where
import.finalized = true;
import.fork_choice = Some(ForkChoiceStrategy::Custom(true));
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
async fn import_justified(
@@ -205,6 +204,6 @@ where
import.finalized = true;
import.fork_choice = Some(ForkChoiceStrategy::LongestChain);
BlockImport::import_block(self, import, HashMap::new()).await.map(|_| ())
BlockImport::import_block(self, import).await.map(|_| ())
}
}