--geth compatibility option

This commit is contained in:
Gav Wood 2016-05-08 13:34:01 +01:00
parent e74c333819
commit 04f7322f06
2 changed files with 5 additions and 1 deletions

View File

@ -136,6 +136,9 @@ Footprint Options:
options.
Legacy Options:
--geth Run in Geth-compatibility mode. Currently just sets
the IPC path to be the same as Geth's. Overrides
the --ipc-path/--ipcpath options.
--datadir PATH Equivalent to --db-path PATH.
--testnet Equivalent to --chain testnet.
--networkid INDEX Equivalent to --network-id INDEX.
@ -214,6 +217,7 @@ pub struct Args {
pub flag_logging: Option<String>,
pub flag_version: bool,
// legacy...
pub flag_geth: bool,
pub flag_nodekey: Option<String>,
pub flag_nodiscover: bool,
pub flag_maxpeers: Option<usize>,

View File

@ -270,7 +270,7 @@ impl Configuration {
pub fn ipc_settings(&self) -> IpcConfiguration {
IpcConfiguration {
enabled: !(self.args.flag_ipcdisable || self.args.flag_ipc_off),
socket_addr: self.args.flag_ipcpath.clone().unwrap_or(self.args.flag_ipc_path.clone())
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()) }
.replace("$HOME", env::home_dir().unwrap().to_str().unwrap()),
apis: self.args.flag_ipcapi.clone().unwrap_or(self.args.flag_ipc_apis.clone()),
}