chore: make ipcpath arg default (#4036)

This commit is contained in:
Matthias Seitz
2023-08-02 17:58:22 +02:00
committed by GitHub
parent 86ccf2f724
commit d595834d20

View File

@ -103,8 +103,8 @@ pub struct RpcServerArgs<Ext: RethRpcServerArgsExt = NoopArgsExt> {
pub ipcdisable: bool,
/// Filename for IPC socket/pipe within the datadir
#[arg(long)]
pub ipcpath: Option<String>,
#[arg(long, default_value_t = constants::DEFAULT_IPC_ENDPOINT.to_string())]
pub ipcpath: String,
/// Auth server address to listen on
#[arg(long = "authrpc.addr", default_value_t = IpAddr::V4(Ipv4Addr::LOCALHOST))]
@ -433,9 +433,8 @@ impl<Ext: RethRpcServerArgsExt> RpcServerArgs<Ext> {
}
if self.is_ipc_enabled() {
config = config.with_ipc(self.ipc_server_builder()).with_ipc_endpoint(
self.ipcpath.as_ref().unwrap_or(&constants::DEFAULT_IPC_ENDPOINT.to_string()),
);
config =
config.with_ipc(self.ipc_server_builder()).with_ipc_endpoint(self.ipcpath.clone());
}
config