Skip to content

Commit 802d9b6

Browse files
authored
fix: don't allow mixnode running in exit mode (#5898)
* fix: don't allow mixnode running in exit mode * fixed error message
1 parent 329ad83 commit 802d9b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

nym-node/src/config/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,14 @@ impl Config {
433433
));
434434
}
435435

436+
// nor it's allowed to run mixnode mode alongside exit mode
437+
// (use two separate checks for better error messages)
438+
if self.modes.mixnode && self.modes.exit {
439+
return Err(NymNodeError::config_validation_failure(
440+
"illegal modes configuration - node cannot run as a mixnode and an exit gateway",
441+
));
442+
}
443+
436444
Ok(())
437445
}
438446
}

0 commit comments

Comments
 (0)