mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-28 16:48:13 -05:00
fix: also adjust ipc path (#5909)
This commit is contained in:
@@ -195,6 +195,7 @@ impl RpcServerArgs {
|
||||
/// * The `auth_port` is scaled by a factor of `instance * 100`
|
||||
/// * The `http_port` is scaled by a factor of `-instance`
|
||||
/// * The `ws_port` is scaled by a factor of `instance * 2`
|
||||
/// * The `ipcpath` is appended with the instance number: `/tmp/reth.ipc-<instance>`
|
||||
///
|
||||
/// # Panics
|
||||
/// Warning: if `instance` is zero in debug mode, this will panic.
|
||||
@@ -212,6 +213,10 @@ impl RpcServerArgs {
|
||||
self.http_port -= instance - 1;
|
||||
// ws port is scaled by a factor of instance * 2
|
||||
self.ws_port += instance * 2 - 2;
|
||||
|
||||
// also adjust the ipc path by appending the instance number to the path used for the
|
||||
// endpoint
|
||||
self.ipcpath = format!("{}-{}", self.ipcpath, instance);
|
||||
}
|
||||
|
||||
/// Configures and launches _all_ servers.
|
||||
|
||||
Reference in New Issue
Block a user