File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
binaries/cuprated/src/config Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,10 @@ pub struct Args {
1414 /// The network to run on.
1515 #[ arg(
1616 long,
17- default_value_t = Network :: Mainnet ,
1817 value_parser = clap:: builder:: PossibleValuesParser :: new( [ "mainnet" , "testnet" , "stagenet" ] )
19- . map( |s| s. parse:: <Network >( ) . unwrap( ) ) ,
18+ . map( |s| Some ( s. parse:: <Network >( ) . unwrap( ) ) ) ,
2019 ) ]
21- pub network : Network ,
20+ pub network : Option < Network > ,
2221
2322 /// Disable fast sync, all past blocks will undergo full verification when syncing.
2423 ///
@@ -70,7 +69,9 @@ impl Args {
7069 ///
7170 /// This may exit the program if a config value was set that requires an early exit.
7271 pub const fn apply_args ( & self , mut config : Config ) -> Config {
73- config. network = self . network ;
72+ if let Some ( network) = self . network {
73+ config. network = network;
74+ }
7475 config. fast_sync = config. fast_sync && !self . no_fast_sync ;
7576
7677 if let Some ( outbound_connections) = self . outbound_connections {
You can’t perform that action at this time.
0 commit comments