From 4d44d328c0c7e76a7619efa4283c33eb21f3ddfe Mon Sep 17 00:00:00 2001 From: Nick Gheorghita Date: Wed, 24 Apr 2024 11:31:09 -0400 Subject: [PATCH] refactor(bridge): add default value for cli flags (#1270) --- portal-bridge/src/cli.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/portal-bridge/src/cli.rs b/portal-bridge/src/cli.rs index 796f6a307..6446885d7 100644 --- a/portal-bridge/src/cli.rs +++ b/portal-bridge/src/cli.rs @@ -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")] @@ -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( @@ -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,