Skip to content

Commit

Permalink
validator: use config passed via cmdline (MystenLabs#2107)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill authored May 20, 2022
1 parent f155b43 commit 275e294
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sui/src/bin/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ async fn main() -> Result<(), anyhow::Error> {

let cfg = ValidatorOpt::parse();

let config_path = sui_config_dir()?.join(SUI_NETWORK_CONFIG);
let config_path = if let Some(config_path) = cfg.config_path {
config_path
} else {
sui_config_dir()?.join(SUI_NETWORK_CONFIG)
};

let validator_config = match (config_path.exists(), cfg.force_genesis) {
(true, false) => PersistedConfig::<ValidatorConfig>::read(&config_path)?,
Expand Down

0 comments on commit 275e294

Please sign in to comment.