mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +00:00
Split BlockImport and JustificationImport (#1521)
* Split BlockImport and JustificationImport * Remove unused trait impl * Fix compile * Fix grandpa tests * Fix network tests
This commit is contained in:
committed by
Robert Habermeier
parent
14e8be794f
commit
dd88dc6cd6
@@ -120,23 +120,25 @@ construct_service_factory! {
|
||||
{ |config, executor| <LightComponents<Factory>>::new(config, executor) },
|
||||
FullImportQueue = AuraImportQueue<
|
||||
Self::Block,
|
||||
grandpa::BlockImportForService<Self>,
|
||||
FullClient<Self>,
|
||||
NothingExtra,
|
||||
>
|
||||
{ |config: &mut FactoryFullConfiguration<Self> , client: Arc<FullClient<Self>>| {
|
||||
{ |config: &mut FactoryFullConfiguration<Self>, client: Arc<FullClient<Self>>| {
|
||||
let slot_duration = SlotDuration::get_or_compute(&*client)?;
|
||||
|
||||
let (block_import, link_half) =
|
||||
grandpa::block_import::<_, _, _, RuntimeApi, FullClient<Self>>(
|
||||
client.clone(), client
|
||||
client.clone(), client.clone()
|
||||
)?;
|
||||
let block_import = Arc::new(block_import);
|
||||
let justification_import = block_import.clone();
|
||||
|
||||
config.custom.grandpa_import_setup = Some((block_import.clone(), link_half));
|
||||
|
||||
import_queue(
|
||||
slot_duration,
|
||||
block_import,
|
||||
Some(justification_import),
|
||||
client,
|
||||
NothingExtra,
|
||||
config.custom.inherent_data_providers.clone(),
|
||||
).map_err(Into::into)
|
||||
@@ -149,6 +151,8 @@ construct_service_factory! {
|
||||
{ |config: &FactoryFullConfiguration<Self>, client: Arc<LightClient<Self>>| {
|
||||
import_queue(
|
||||
SlotDuration::get_or_compute(&*client)?,
|
||||
client.clone(),
|
||||
None,
|
||||
client,
|
||||
NothingExtra,
|
||||
config.custom.inherent_data_providers.clone(),
|
||||
|
||||
Reference in New Issue
Block a user