aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 04:56:38 +0100
committertv <tv@krebsco.de>2026-10-31 04:56:38 +0100
commit7c148c95c22a9852f46f05d3ee887335c53721d1 (patch)
treed8014671e452823afafdba87648a109d508798df /src
parentc77e4f781097d8ce9f2dbf9162fa71157f1efb96 (diff)
main: call relay_only only with libp2p feature
Diffstat (limited to 'src')
-rw-r--r--src/main.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 617ca94..8d4ce73 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -62,6 +62,8 @@ async fn main() -> Result<()> {
"Options of a transport this node doesn't use are ignored"
);
}
+ // Only with libp2p: without, `config` refuses `relay-only` already.
+ #[cfg(feature = "libp2p")]
if args.relay_only {
return relay_only(args).await;
}
@@ -359,11 +361,6 @@ async fn relay_only(args: &config::Settings) -> Result<()> {
Ok(())
}
-#[cfg(not(feature = "libp2p"))]
-async fn relay_only(_args: &config::Settings) -> Result<()> {
- anyhow::bail!("relay-only relays over libp2p; this build has no libp2p")
-}
-
/// Turns SIGINT and SIGTERM into a shutdown request. A second signal exits at once (the
/// supervised Mycelium still gets its parent-death signal then).
fn watch_for_shutdown() -> Result<watch::Receiver<bool>> {