mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 05:07:55 +00:00
node: re-introduce validator flag (#3351)
This commit is contained in:
committed by
Bastian Köcher
parent
c824c959d7
commit
98d502466d
@@ -438,11 +438,14 @@ where
|
||||
|
||||
let is_dev = cli.shared_params.dev;
|
||||
|
||||
let role = if cli.light {
|
||||
service::Roles::LIGHT
|
||||
} else {
|
||||
service::Roles::AUTHORITY
|
||||
};
|
||||
let role =
|
||||
if cli.light {
|
||||
service::Roles::LIGHT
|
||||
} else if cli.validator || is_dev {
|
||||
service::Roles::AUTHORITY
|
||||
} else {
|
||||
service::Roles::FULL
|
||||
};
|
||||
|
||||
let exec = cli.execution_strategies;
|
||||
let exec_all_or = |strat: params::ExecutionStrategy| exec.execution.unwrap_or(strat).into();
|
||||
|
||||
@@ -297,7 +297,11 @@ pub struct ExecutionStrategies {
|
||||
/// The `run` command used to run a node.
|
||||
#[derive(Debug, StructOpt, Clone)]
|
||||
pub struct RunCmd {
|
||||
/// Disable GRANDPA when running in validator mode
|
||||
/// Enable validator mode
|
||||
#[structopt(long = "validator")]
|
||||
pub validator: bool,
|
||||
|
||||
/// Disable GRANDPA voter when running in validator mode, otherwise disables the GRANDPA observer
|
||||
#[structopt(long = "no-grandpa")]
|
||||
pub no_grandpa: bool,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user