Skip to content

Commit

Permalink
refactor(bridge): add default value for cli flags (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
njgheorghita authored Apr 24, 2024
1 parent 7b68b72 commit 4d44d32
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions portal-bridge/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ use ethportal_api::types::cli::{
// - running more than 16 nodes simultaneously is not thoroughly tested
pub const MAX_NODE_COUNT: u8 = 16;
const DEFAULT_SUBNETWORK: &str = "history";
const DEFAULT_EXECUTABLE_PATH: &str = "./target/debug/trin";
const DEFAULT_EPOCH_ACC_PATH: &str = "./portal-accumulators";

#[derive(Parser, Debug, Clone)]
#[command(name = "Trin Bridge", about = "Feed the network")]
Expand All @@ -36,7 +38,7 @@ pub struct BridgeConfig {
)]
pub node_count: u8,

#[arg(long, help = "path to portalnet client executable")]
#[arg(long, help = "path to portalnet client executable", default_value = DEFAULT_EXECUTABLE_PATH)]
pub executable_path: PathBuf,

#[arg(
Expand All @@ -48,7 +50,8 @@ pub struct BridgeConfig {

#[arg(
long = "epoch-accumulator-path",
help = "Path to epoch accumulator repo for bridge mode"
help = "Path to epoch accumulator repo for bridge mode",
default_value = DEFAULT_EPOCH_ACC_PATH
)]
pub epoch_acc_path: PathBuf,

Expand Down

0 comments on commit 4d44d32

Please sign in to comment.