aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
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
commitedc143d3f24402c03197250b8431e0b7e000496b (patch)
tree0effb713f69726433a0ddc617776266f1ddbb9f0 /src/main.rs
parentfd702346f09ad970ff068c04d1baa61c6a923357 (diff)
main: call relay_only only with libp2p feature
Diffstat (limited to 'src/main.rs')
-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>> {