Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed May 22, 2023
1 parent 2386d87 commit e45bca6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ sc-consensus = { git = "https://github.com/parityt
sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ sc-client-api = { workspace = true }
sc-consensus = { workspace = true }
sc-consensus-aura = { workspace = true }
sc-executor = { workspace = true }
sc-network = { workspace = true }
sc-network-common = { workspace = true }
sc-network-sync = { workspace = true }
sc-offchain = { workspace = true }
sc-rpc = { workspace = true }
sc-service = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct FullDeps<C, P, A: sc_transaction_pool::ChainApi> {
/// The Node authority flag
pub is_authority: bool,
/// Network service
pub network: Arc<sc_network::NetworkService<Block, Hash>>,
pub network: Arc<sc_network_sync::SyncingService<Block, Hash>>,
/// EthFilterApi pool.
pub filter_pool: Option<fc_rpc_core::types::FilterPool>,
/// Backend.
Expand Down
14 changes: 8 additions & 6 deletions node/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ where
&sc_service::TaskManager,
Arc<dyn cumulus_relay_chain_interface::RelayChainInterface>,
Arc<sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, Executor>>>,
Arc<sc_network::NetworkService<Block, Hash>>,
Arc<sc_network_sync::SyncingService<Block, Hash>>,
sp_keystore::SyncCryptoStorePtr,
bool,
) -> Result<
Expand Down Expand Up @@ -326,7 +326,7 @@ where
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let import_queue_service = import_queue.service();

let (network, system_rpc_tx, tx_handler_controller, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
sc_service::build_network(cumulus_client_service::BuildNetworkParams {
parachain_config: &parachain_config,
client: client.clone(),
Expand Down Expand Up @@ -427,6 +427,7 @@ where
keystore: keystore_container.sync_keystore(),
backend: backend.clone(),
network: network.clone(),
sync_service: sync_service.clone(),
system_rpc_tx,
tx_handler_controller,
telemetry: telemetry.as_mut(),
Expand Down Expand Up @@ -456,8 +457,8 @@ where
}

let announce_block = {
let network = network.clone();
Arc::new(move |hash, data| network.announce_block(hash, data))
let sync_service = sync_service.clone();
Arc::new(move |hash, data| sync_service.announce_block(hash, data))
};

let relay_chain_slot_duration = Duration::from_secs(6);
Expand All @@ -475,7 +476,7 @@ where
&task_manager,
relay_chain_interface.clone(),
transaction_pool,
network,
sync_service,
keystore_container.sync_keystore(),
force_authoring,
)?;
Expand Down Expand Up @@ -713,7 +714,7 @@ where
),
} = new_partial::<RuntimeApi, Executor>(&config, eth_rpc_config)?;

let (network, system_rpc_tx, tx_handler_controller, start_network) =
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
sc_service::build_network(cumulus_client_service::BuildNetworkParams {
parachain_config: &config,
client: client.clone(),
Expand Down Expand Up @@ -913,6 +914,7 @@ where
keystore: keystore_container.sync_keystore(),
backend,
network,
sync_service,
system_rpc_tx,
tx_handler_controller,
telemetry: None,
Expand Down

0 comments on commit e45bca6

Please sign in to comment.