From 68f60596dcc098c654686d90e6c674bd214ae7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 4 Nov 2016 09:58:39 +0100 Subject: [PATCH] Enabling personal RPC over IPC by default (#3165) --- parity/cli/config.full.toml | 2 +- parity/cli/mod.rs | 4 ++-- parity/rpc.rs | 2 +- parity/rpc_apis.rs | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index c8c2f792c..088c9d4b7 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -47,7 +47,7 @@ hosts = ["none"] [ipc] disable = false path = "$HOME/.parity/jsonrpc.ipc" -apis = ["web3", "eth", "net", "ethcore", "traces", "rpc", "personal_safe"] +apis = ["web3", "eth", "net", "ethcore", "traces", "rpc", "personal", "personal_safe"] [dapps] disable = false diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 3f66cfba5..c0e7241b0 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -155,7 +155,7 @@ usage! { or |c: &Config| otry!(c.ipc).disable.clone(), flag_ipc_path: String = "$HOME/.parity/jsonrpc.ipc", or |c: &Config| otry!(c.ipc).path.clone(), - flag_ipc_apis: String = "web3,eth,net,ethcore,traces,rpc,personal_safe", + flag_ipc_apis: String = "web3,eth,net,ethcore,traces,rpc,personal,personal_safe", or |c: &Config| otry!(c.ipc).apis.clone().map(|vec| vec.join(",")), // DAPPS @@ -549,7 +549,7 @@ mod tests { // IPC flag_no_ipc: false, flag_ipc_path: "$HOME/.parity/jsonrpc.ipc".into(), - flag_ipc_apis: "web3,eth,net,ethcore,traces,rpc,personal_safe".into(), + flag_ipc_apis: "web3,eth,net,ethcore,traces,rpc,personal,personal_safe".into(), // DAPPS flag_no_dapps: false, diff --git a/parity/rpc.rs b/parity/rpc.rs index c5a4df18a..59279eaea 100644 --- a/parity/rpc.rs +++ b/parity/rpc.rs @@ -63,7 +63,7 @@ impl Default for IpcConfiguration { IpcConfiguration { enabled: true, socket_addr: parity_ipc_path("$HOME/.parity/jsonrpc.ipc"), - apis: ApiSet::UnsafeContext, + apis: ApiSet::IpcContext, } } } diff --git a/parity/rpc_apis.rs b/parity/rpc_apis.rs index 1aae27dd2..d725b9b08 100644 --- a/parity/rpc_apis.rs +++ b/parity/rpc_apis.rs @@ -69,6 +69,7 @@ impl FromStr for Api { pub enum ApiSet { SafeContext, UnsafeContext, + IpcContext, List(HashSet), } @@ -139,6 +140,10 @@ impl ApiSet { vec![Api::Web3, Api::Net, Api::Eth, Api::Ethcore, Api::Traces, Api::Rpc, Api::PersonalSafe] .into_iter().collect() }, + ApiSet::IpcContext => { + vec![Api::Web3, Api::Net, Api::Eth, Api::Ethcore, Api::Traces, Api::Rpc, Api::PersonalAccounts, Api::PersonalSafe] + .into_iter().collect() + }, ApiSet::SafeContext => { vec![Api::Web3, Api::Net, Api::Eth, Api::PersonalAccounts, Api::PersonalSafe, Api::Signer, Api::Ethcore, Api::EthcoreSet, Api::Traces, Api::Rpc] .into_iter().collect()