mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 06:57:58 +00:00
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:
@@ -209,9 +209,8 @@ where
|
||||
async fn import_block(
|
||||
&mut self,
|
||||
block: BlockImportParams<TestBlock, Self::Transaction>,
|
||||
new_cache: HashMap<CacheKeyId, Vec<u8>>,
|
||||
) -> Result<ImportResult, Self::Error> {
|
||||
Ok(self.0.import_block(block, new_cache).await.expect("importing block failed"))
|
||||
Ok(self.0.import_block(block).await.expect("importing block failed"))
|
||||
}
|
||||
|
||||
async fn check_block(
|
||||
@@ -258,7 +257,7 @@ impl Verifier<TestBlock> for TestVerifier {
|
||||
async fn verify(
|
||||
&mut self,
|
||||
mut block: BlockImportParams<TestBlock, ()>,
|
||||
) -> Result<(BlockImportParams<TestBlock, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String> {
|
||||
) -> Result<BlockImportParams<TestBlock, ()>, String> {
|
||||
// apply post-sealing mutations (i.e. stripping seal, if desired).
|
||||
(self.mutator)(&mut block.header, Stage::PostSeal);
|
||||
self.inner.verify(block).await
|
||||
@@ -743,7 +742,7 @@ async fn propose_and_import_block<Transaction: Send + 'static>(
|
||||
import
|
||||
.insert_intermediate(INTERMEDIATE_KEY, BabeIntermediate::<TestBlock> { epoch_descriptor });
|
||||
import.fork_choice = Some(ForkChoiceStrategy::LongestChain);
|
||||
let import_result = block_import.import_block(import, Default::default()).await.unwrap();
|
||||
let import_result = block_import.import_block(import).await.unwrap();
|
||||
|
||||
match import_result {
|
||||
ImportResult::Imported(_) => {},
|
||||
|
||||
Reference in New Issue
Block a user