Enforce a single daemon per geth home
This commit is contained in:
parent
f61cb44dad
commit
ed007a0632
6 changed files with 90 additions and 5 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue