mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
remove the --disable-authority-discovery flag & related (#1870)
This commit is contained in:
committed by
GitHub
parent
e2e57cb8f6
commit
62daee2286
@@ -441,7 +441,6 @@ impl IsCollator {
|
||||
#[cfg(feature = "full-node")]
|
||||
pub fn new_full<RuntimeApi, Executor>(
|
||||
mut config: Configuration,
|
||||
authority_discovery_disabled: bool,
|
||||
is_collator: IsCollator,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
) -> Result<NewFull<Arc<FullClient<RuntimeApi, Executor>>>, Error>
|
||||
@@ -535,10 +534,6 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
use sc_network::Event;
|
||||
use futures::StreamExt;
|
||||
|
||||
if authority_discovery_disabled {
|
||||
Err("Authority discovery is mandatory for a validator.")?;
|
||||
}
|
||||
|
||||
let authority_discovery_role = if role.is_authority() {
|
||||
authority_discovery::Role::PublishAndDiscover(
|
||||
keystore_container.keystore(),
|
||||
@@ -867,35 +862,30 @@ pub fn build_light(config: Configuration) -> Result<(TaskManager, RpcHandlers),
|
||||
#[cfg(feature = "full-node")]
|
||||
pub fn build_full(
|
||||
config: Configuration,
|
||||
authority_discovery_disabled: bool,
|
||||
is_collator: IsCollator,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
) -> Result<NewFull<Client>, Error> {
|
||||
if config.chain_spec.is_rococo() {
|
||||
new_full::<rococo_runtime::RuntimeApi, RococoExecutor>(
|
||||
config,
|
||||
authority_discovery_disabled,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Rococo))
|
||||
} else if config.chain_spec.is_kusama() {
|
||||
new_full::<kusama_runtime::RuntimeApi, KusamaExecutor>(
|
||||
config,
|
||||
authority_discovery_disabled,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Kusama))
|
||||
} else if config.chain_spec.is_westend() {
|
||||
new_full::<westend_runtime::RuntimeApi, WestendExecutor>(
|
||||
config,
|
||||
authority_discovery_disabled,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Westend))
|
||||
} else {
|
||||
new_full::<polkadot_runtime::RuntimeApi, PolkadotExecutor>(
|
||||
config,
|
||||
authority_discovery_disabled,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
).map(|full| full.with_client(Client::Polkadot))
|
||||
|
||||
Reference in New Issue
Block a user