From 802d9b69ca8e6b145f7e09e06682d71a6ea15ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Thu, 17 Jul 2025 10:57:16 +0100 Subject: [PATCH] fix: don't allow mixnode running in exit mode (#5898) * fix: don't allow mixnode running in exit mode * fixed error message --- nym-node/src/config/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nym-node/src/config/mod.rs b/nym-node/src/config/mod.rs index 80836b3834..257fc0f862 100644 --- a/nym-node/src/config/mod.rs +++ b/nym-node/src/config/mod.rs @@ -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(()) } }