--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. options.
Legacy 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. --datadir PATH Equivalent to --db-path PATH.
--testnet Equivalent to --chain testnet. --testnet Equivalent to --chain testnet.
--networkid INDEX Equivalent to --network-id INDEX. --networkid INDEX Equivalent to --network-id INDEX.
@ -214,6 +217,7 @@ pub struct Args {
pub flag_logging: Option<String>, pub flag_logging: Option<String>,
pub flag_version: bool, pub flag_version: bool,
// legacy... // legacy...
pub flag_geth: bool,
pub flag_nodekey: Option<String>, pub flag_nodekey: Option<String>,
pub flag_nodiscover: bool, pub flag_nodiscover: bool,
pub flag_maxpeers: Option<usize>, pub flag_maxpeers: Option<usize>,

View File

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