node: re-introduce validator flag (#3351)

This commit is contained in:
André Silva
2019-08-09 14:17:52 +01:00
committed by Bastian Köcher
parent c824c959d7
commit 98d502466d
3 changed files with 73 additions and 55 deletions
+8 -5
View File
@@ -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();
+5 -1
View File
@@ -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,