mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
*: Enable authority discovery by default (#1395)
* *: Enable authority discovery by default Instead of having to explicitly enable the authority discovery module on validator and sentry nodes, this commit enables the module by default. Today there is no way for non validator or sentry nodes to run the module. That might change in the future. * service/src/lib: Fix typo in new_full! for test
This commit is contained in:
+13
-13
@@ -297,7 +297,7 @@ macro_rules! new_full {
|
||||
$config:expr,
|
||||
$collating_for:expr,
|
||||
$max_block_data_size:expr,
|
||||
$authority_discovery_enabled:expr,
|
||||
$authority_discovery_disabled:expr,
|
||||
$slot_duration:expr,
|
||||
$grandpa_pause:expr,
|
||||
$new_full_start:expr $(,)?
|
||||
@@ -318,7 +318,7 @@ macro_rules! new_full {
|
||||
let max_block_data_size = $max_block_data_size;
|
||||
let disable_grandpa = $config.disable_grandpa;
|
||||
let name = $config.network.node_name.clone();
|
||||
let authority_discovery_enabled = $authority_discovery_enabled;
|
||||
let authority_discovery_disabled = $authority_discovery_disabled;
|
||||
let slot_duration = $slot_duration;
|
||||
|
||||
let (builder, mut import_setup, inherent_data_providers, mut rpc_setup) = $new_full_start;
|
||||
@@ -459,7 +459,7 @@ macro_rules! new_full {
|
||||
}
|
||||
|
||||
if matches!(role, Role::Authority{..} | Role::Sentry{..}) {
|
||||
if authority_discovery_enabled {
|
||||
if !authority_discovery_disabled {
|
||||
let (sentries, authority_discovery_role) = match role {
|
||||
Role::Authority { ref sentry_nodes } => (
|
||||
sentry_nodes.clone(),
|
||||
@@ -568,7 +568,7 @@ macro_rules! new_full {
|
||||
$config:expr,
|
||||
$collating_for:expr,
|
||||
$max_block_data_size:expr,
|
||||
$authority_discovery_enabled:expr,
|
||||
$authority_discovery_disabled:expr,
|
||||
$slot_duration:expr,
|
||||
$grandpa_pause:expr,
|
||||
$runtime:ty,
|
||||
@@ -578,7 +578,7 @@ macro_rules! new_full {
|
||||
$config,
|
||||
$collating_for,
|
||||
$max_block_data_size,
|
||||
$authority_discovery_enabled,
|
||||
$authority_discovery_disabled,
|
||||
$slot_duration,
|
||||
$grandpa_pause,
|
||||
new_full_start!($config, $runtime, $dispatch),
|
||||
@@ -589,7 +589,7 @@ macro_rules! new_full {
|
||||
$config:expr,
|
||||
$collating_for:expr,
|
||||
$max_block_data_size:expr,
|
||||
$authority_discovery_enabled:expr,
|
||||
$authority_discovery_disabled:expr,
|
||||
$slot_duration:expr,
|
||||
$runtime:ty,
|
||||
$dispatch:ty,
|
||||
@@ -598,7 +598,7 @@ macro_rules! new_full {
|
||||
$config,
|
||||
$collating_for,
|
||||
$max_block_data_size,
|
||||
$authority_discovery_enabled,
|
||||
$authority_discovery_disabled,
|
||||
$slot_duration,
|
||||
None,
|
||||
new_full_start!(test $config, $runtime, $dispatch),
|
||||
@@ -734,7 +734,7 @@ pub fn polkadot_new_full(
|
||||
mut config: Configuration,
|
||||
collating_for: Option<(CollatorId, parachain::Id)>,
|
||||
max_block_data_size: Option<u64>,
|
||||
authority_discovery_enabled: bool,
|
||||
authority_discovery_disabled: bool,
|
||||
slot_duration: u64,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
)
|
||||
@@ -752,7 +752,7 @@ pub fn polkadot_new_full(
|
||||
config,
|
||||
collating_for,
|
||||
max_block_data_size,
|
||||
authority_discovery_enabled,
|
||||
authority_discovery_disabled,
|
||||
slot_duration,
|
||||
grandpa_pause,
|
||||
polkadot_runtime::RuntimeApi,
|
||||
@@ -768,7 +768,7 @@ pub fn kusama_new_full(
|
||||
mut config: Configuration,
|
||||
collating_for: Option<(CollatorId, parachain::Id)>,
|
||||
max_block_data_size: Option<u64>,
|
||||
authority_discovery_enabled: bool,
|
||||
authority_discovery_disabled: bool,
|
||||
slot_duration: u64,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
) -> Result<(
|
||||
@@ -786,7 +786,7 @@ pub fn kusama_new_full(
|
||||
config,
|
||||
collating_for,
|
||||
max_block_data_size,
|
||||
authority_discovery_enabled,
|
||||
authority_discovery_disabled,
|
||||
slot_duration,
|
||||
grandpa_pause,
|
||||
kusama_runtime::RuntimeApi,
|
||||
@@ -802,7 +802,7 @@ pub fn westend_new_full(
|
||||
mut config: Configuration,
|
||||
collating_for: Option<(CollatorId, parachain::Id)>,
|
||||
max_block_data_size: Option<u64>,
|
||||
authority_discovery_enabled: bool,
|
||||
authority_discovery_disabled: bool,
|
||||
slot_duration: u64,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
)
|
||||
@@ -820,7 +820,7 @@ pub fn westend_new_full(
|
||||
config,
|
||||
collating_for,
|
||||
max_block_data_size,
|
||||
authority_discovery_enabled,
|
||||
authority_discovery_disabled,
|
||||
slot_duration,
|
||||
grandpa_pause,
|
||||
westend_runtime::RuntimeApi,
|
||||
|
||||
Reference in New Issue
Block a user