From 76d3c0ef3880bb469cea9ef4ca40e7d2120f5a3c Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 31 Dec 2023 07:52:07 +0100 Subject: [PATCH] fix: also adjust ipc path --- bin/reth/src/args/rpc_server_args.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/reth/src/args/rpc_server_args.rs b/bin/reth/src/args/rpc_server_args.rs index 64db2104e63f..1f0846b1faf7 100644 --- a/bin/reth/src/args/rpc_server_args.rs +++ b/bin/reth/src/args/rpc_server_args.rs @@ -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-` /// /// # 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.