mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 21:21:11 +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:
@@ -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(|_| ())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user