Skip to content

Commit

Permalink
chore: readjusted --mode behaviour to fix the regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuczyn committed Jan 10, 2025
1 parent 529e8d4 commit c280bed
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nym-node/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ pub enum NodeMode {
#[clap(alias = "entry", alias = "gateway")]
EntryGateway,

// to not break existing behaviour, this means exit capabilities AND entry capabilities
#[clap(alias = "exit")]
ExitGateway,

// entry + exit
FullGateway,
// will start only SP needed for exit capabilities WITHOUT entry routing
ExitProvidersOnly,
}

impl Display for NodeMode {
Expand All @@ -88,7 +89,7 @@ impl Display for NodeMode {
NodeMode::Mixnode => "mixnode".fmt(f),
NodeMode::EntryGateway => "entry-gateway".fmt(f),
NodeMode::ExitGateway => "exit-gateway".fmt(f),
NodeMode::FullGateway => "full-gateway".fmt(f),
NodeMode::ExitProvidersOnly => "exit-providers-only".fmt(f),
}
}
}
Expand Down Expand Up @@ -129,8 +130,8 @@ impl NodeModes {
match mode {
NodeMode::Mixnode => self.with_mixnode(),
NodeMode::EntryGateway => self.with_entry(),
NodeMode::ExitGateway => self.with_exit(),
NodeMode::FullGateway => self.with_entry().with_exit(),
NodeMode::ExitGateway => self.with_entry().with_exit(),
NodeMode::ExitProvidersOnly => self.with_exit(),
}
}

Expand Down

0 comments on commit c280bed

Please sign in to comment.