Fix --geth IPC for MacOS. (#1062)
This commit is contained in:
parent
49cc40708d
commit
2a19f91e99
@ -267,10 +267,18 @@ impl Configuration {
|
||||
self.args.flag_jsonrpc_cors.clone().or(self.args.flag_rpccorsdomain.clone())
|
||||
}
|
||||
|
||||
fn geth_ipc_path() -> &'static str {
|
||||
if cfg!(target_os = "macos") {
|
||||
"$HOME/Library/Ethereum/geth.ipc"
|
||||
} else {
|
||||
"$HOME/.ethereum/geth.ipc"
|
||||
}
|
||||
}
|
||||
|
||||
pub fn ipc_settings(&self) -> IpcConfiguration {
|
||||
IpcConfiguration {
|
||||
enabled: !(self.args.flag_ipcdisable || self.args.flag_ipc_off),
|
||||
socket_addr: if self.args.flag_geth { "$HOME/.ethereum/geth.ipc".to_owned() } else { self.args.flag_ipcpath.clone().unwrap_or(self.args.flag_ipc_path.clone()) }
|
||||
socket_addr: if self.args.flag_geth { Self::geth_ipc_path().to_owned() } else { self.args.flag_ipcpath.clone().unwrap_or(self.args.flag_ipc_path.clone()) }
|
||||
.replace("$HOME", env::home_dir().unwrap().to_str().unwrap()),
|
||||
apis: self.args.flag_ipcapi.clone().unwrap_or(self.args.flag_ipc_apis.clone()),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user