mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Companion for paritytech/substrate#12828 (#1939)
* Companion for paritytech/substrate#12764 * Remove `async-trait` * Companion for paritytech/substrate#12828 * carg fmt * Update client/relay-chain-minimal-node/src/network.rs Co-authored-by: Bastian Köcher <git@kchr.de> * update lockfile for {"polkadot", "substrate"} --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -53,6 +53,7 @@ sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch
|
||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
@@ -43,8 +43,8 @@ use sc_consensus::{
|
||||
BlockImportParams, ImportQueue,
|
||||
};
|
||||
use sc_executor::WasmExecutor;
|
||||
use sc_network::NetworkService;
|
||||
use sc_network_common::service::NetworkBlock;
|
||||
use sc_network_sync::SyncingService;
|
||||
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
|
||||
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
|
||||
use sp_api::{ApiExt, ConstructRuntimeApi};
|
||||
@@ -359,7 +359,7 @@ where
|
||||
&TaskManager,
|
||||
Arc<dyn RelayChainInterface>,
|
||||
Arc<sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>>,
|
||||
Arc<NetworkService<Block, Hash>>,
|
||||
Arc<SyncingService<Block>>,
|
||||
SyncCryptoStorePtr,
|
||||
bool,
|
||||
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
|
||||
@@ -394,7 +394,7 @@ where
|
||||
let transaction_pool = params.transaction_pool.clone();
|
||||
let import_queue_service = params.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) =
|
||||
build_network(BuildNetworkParams {
|
||||
parachain_config: ¶chain_config,
|
||||
client: client.clone(),
|
||||
@@ -418,6 +418,7 @@ where
|
||||
keystore: params.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(),
|
||||
@@ -440,8 +441,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);
|
||||
@@ -459,7 +460,7 @@ where
|
||||
&task_manager,
|
||||
relay_chain_interface.clone(),
|
||||
transaction_pool,
|
||||
network,
|
||||
sync_service,
|
||||
params.keystore_container.sync_keystore(),
|
||||
force_authoring,
|
||||
)?;
|
||||
@@ -549,7 +550,7 @@ where
|
||||
&TaskManager,
|
||||
Arc<dyn RelayChainInterface>,
|
||||
Arc<sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>>,
|
||||
Arc<NetworkService<Block, Hash>>,
|
||||
Arc<SyncingService<Block>>,
|
||||
SyncCryptoStorePtr,
|
||||
bool,
|
||||
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
|
||||
@@ -583,8 +584,8 @@ where
|
||||
let transaction_pool = params.transaction_pool.clone();
|
||||
let import_queue_service = params.import_queue.service();
|
||||
|
||||
let (network, system_rpc_tx, tx_handler_controller, start_network) =
|
||||
build_network(cumulus_client_service::BuildNetworkParams {
|
||||
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
|
||||
build_network(BuildNetworkParams {
|
||||
parachain_config: ¶chain_config,
|
||||
client: client.clone(),
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
@@ -620,6 +621,7 @@ where
|
||||
keystore: params.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(),
|
||||
@@ -642,8 +644,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);
|
||||
@@ -660,7 +662,7 @@ where
|
||||
&task_manager,
|
||||
relay_chain_interface.clone(),
|
||||
transaction_pool,
|
||||
network,
|
||||
sync_service,
|
||||
params.keystore_container.sync_keystore(),
|
||||
force_authoring,
|
||||
)?;
|
||||
@@ -1321,7 +1323,7 @@ where
|
||||
&TaskManager,
|
||||
Arc<dyn RelayChainInterface>,
|
||||
Arc<sc_transaction_pool::FullPool<Block, ParachainClient<RuntimeApi>>>,
|
||||
Arc<NetworkService<Block, Hash>>,
|
||||
Arc<SyncingService<Block>>,
|
||||
SyncCryptoStorePtr,
|
||||
bool,
|
||||
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
|
||||
@@ -1355,7 +1357,7 @@ where
|
||||
let transaction_pool = params.transaction_pool.clone();
|
||||
let import_queue_service = params.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) =
|
||||
build_network(BuildNetworkParams {
|
||||
parachain_config: ¶chain_config,
|
||||
client: client.clone(),
|
||||
@@ -1391,6 +1393,7 @@ where
|
||||
keystore: params.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(),
|
||||
@@ -1413,8 +1416,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);
|
||||
@@ -1431,7 +1434,7 @@ where
|
||||
&task_manager,
|
||||
relay_chain_interface.clone(),
|
||||
transaction_pool,
|
||||
network,
|
||||
sync_service,
|
||||
params.keystore_container.sync_keystore(),
|
||||
force_authoring,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user