fix: don't allow mixnode running in exit mode (#5898)
* fix: don't allow mixnode running in exit mode * fixed error message
This commit is contained in:
committed by
GitHub
parent
329ad83fc0
commit
802d9b69ca
@@ -433,6 +433,14 @@ impl Config {
|
||||
));
|
||||
}
|
||||
|
||||
// nor it's allowed to run mixnode mode alongside exit mode
|
||||
// (use two separate checks for better error messages)
|
||||
if self.modes.mixnode && self.modes.exit {
|
||||
return Err(NymNodeError::config_validation_failure(
|
||||
"illegal modes configuration - node cannot run as a mixnode and an exit gateway",
|
||||
));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user