feat: add rpc cli flags (#29)

This commit is contained in:
Noah Citron 2022-09-12 20:36:04 -04:00 committed by GitHub
parent 56385f15ed
commit 8e080faf4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -37,6 +37,14 @@ fn get_config() -> Result<Config> {
config.general.rpc_port = Some(port); config.general.rpc_port = Some(port);
} }
if let Some(execution_rpc) = cli.execution_rpc {
config.general.execution_rpc = execution_rpc;
}
if let Some(consensus_rpc) = cli.consensus_rpc {
config.general.consensus_rpc = consensus_rpc;
}
Ok(config) Ok(config)
} }
@ -46,6 +54,10 @@ struct Cli {
network: String, network: String,
#[clap(short, long)] #[clap(short, long)]
port: Option<u16>, port: Option<u16>,
#[clap(short, long)] #[clap(short = 'w', long)]
checkpoint: Option<String>, checkpoint: Option<String>,
#[clap(short, long)]
execution_rpc: Option<String>,
#[clap(short, long)]
consensus_rpc: Option<String>,
} }