mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Remove collating_for argument from service (#1802)
The collator is now enabled in a different way and we don't require this argument anymore.
This commit is contained in:
@@ -328,7 +328,6 @@ impl<C> NewFull<C> {
|
||||
#[cfg(feature = "full-node")]
|
||||
pub fn new_full<RuntimeApi, Executor>(
|
||||
mut config: Configuration,
|
||||
collating_for: Option<(CollatorId, ParaId)>,
|
||||
authority_discovery_enabled: bool,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
) -> Result<NewFull<Arc<FullClient<RuntimeApi, Executor>>>, Error>
|
||||
@@ -338,9 +337,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
|
||||
Executor: NativeExecutionDispatch + 'static,
|
||||
{
|
||||
let is_collator = collating_for.is_some();
|
||||
let role = config.role.clone();
|
||||
let is_authority = role.is_authority() && !is_collator;
|
||||
let force_authoring = config.force_authoring;
|
||||
let disable_grandpa = config.disable_grandpa;
|
||||
let name = config.network.node_name.clone();
|
||||
@@ -470,7 +467,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
|
||||
// if the node isn't actively participating in consensus then it doesn't
|
||||
// need a keystore, regardless of which protocol we use below.
|
||||
let keystore_opt = if is_authority {
|
||||
let keystore_opt = if role.is_authority() {
|
||||
Some(keystore_container.sync_keystore())
|
||||
} else {
|
||||
None
|
||||
@@ -746,35 +743,30 @@ pub fn build_light(config: Configuration) -> Result<(TaskManager, RpcHandlers),
|
||||
#[cfg(feature = "full-node")]
|
||||
pub fn build_full(
|
||||
config: Configuration,
|
||||
collating_for: Option<(CollatorId, ParaId)>,
|
||||
authority_discovery_enabled: bool,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
) -> Result<NewFull<Client>, ServiceError> {
|
||||
if config.chain_spec.is_rococo() {
|
||||
new_full::<rococo_runtime::RuntimeApi, RococoExecutor>(
|
||||
config,
|
||||
collating_for,
|
||||
authority_discovery_enabled,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Rococo))
|
||||
} else if config.chain_spec.is_kusama() {
|
||||
new_full::<kusama_runtime::RuntimeApi, KusamaExecutor>(
|
||||
config,
|
||||
collating_for,
|
||||
authority_discovery_enabled,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Kusama))
|
||||
} else if config.chain_spec.is_westend() {
|
||||
new_full::<westend_runtime::RuntimeApi, WestendExecutor>(
|
||||
config,
|
||||
collating_for,
|
||||
authority_discovery_enabled,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Westend))
|
||||
} else {
|
||||
new_full::<polkadot_runtime::RuntimeApi, PolkadotExecutor>(
|
||||
config,
|
||||
collating_for,
|
||||
authority_discovery_enabled,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Polkadot))
|
||||
|
||||
Reference in New Issue
Block a user