Enforce a single daemon per geth home

This commit is contained in:
Eric Wendland 2026-07-18 15:56:45 +02:00
commit ed007a0632
6 changed files with 90 additions and 5 deletions

View file

@ -195,6 +195,8 @@ pub enum NodeError {
OverlayRuntime(String),
#[error("unsupported platform: {0}")]
UnsupportedPlatform(String),
#[error("geth daemon is already running for home: {0}")]
DaemonAlreadyRunning(PathBuf),
}
#[derive(Clone, Debug)]
@ -11141,6 +11143,12 @@ mod tests {
local_control::node_error_code(&NodeError::IrohEndpointUnavailable),
"iroh_endpoint_unavailable"
);
assert_eq!(
local_control::node_error_code(&NodeError::DaemonAlreadyRunning(PathBuf::from(
"/tmp/geth"
))),
"daemon_already_running"
);
}
#[derive(Debug, PartialEq, Eq)]