Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions node-template/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ macro_rules! new_full_start {
let import_queue = aura::import_queue::<_, _, AuraPair, _>(
aura::SlotDuration::get_or_compute(&*client)?,
Box::new(grandpa_block_import.clone()),
Some(Box::new(grandpa_block_import)),
Some(Box::new(grandpa_block_import.clone())),
None,
client,
inherent_data_providers.clone(),
Some(transaction_pool),
)?;

import_setup = Some(grandpa_link);
import_setup = Some((grandpa_block_import, grandpa_link));

Ok(import_queue)
})?;
Expand All @@ -83,9 +83,9 @@ pub fn new_full<C: Send + Default + 'static>(config: Configuration<C, GenesisCon

let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config);

let grandpa_link =
let (block_import, grandpa_link) =
import_setup.take()
.expect("Link is present for Full Services or setup failed before. qed");
.expect("Link Half and Block Import are present for Full Services or setup failed before. qed");

let service = builder.with_network_protocol(|_| Ok(NodeProtocol::new()))?
.with_finality_proof_provider(|client, backend|
Expand All @@ -105,9 +105,9 @@ pub fn new_full<C: Send + Default + 'static>(config: Configuration<C, GenesisCon

let aura = aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>(
aura::SlotDuration::get_or_compute(&*client)?,
client.clone(),
select_chain,
client,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fact that it's so easy to get this wrong means that we should probably not implement BlockImport on Client.

select_chain,
block_import,
proposer,
service.network(),
inherent_data_providers.clone(),
Expand Down