Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Enabling personal RPC over IPC by default (#3165)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored and gavofyork committed Nov 4, 2016
1 parent c532032 commit 68f6059
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion parity/cli/config.full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions parity/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion parity/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions parity/rpc_apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ impl FromStr for Api {
pub enum ApiSet {
SafeContext,
UnsafeContext,
IpcContext,
List(HashSet<Api>),
}

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 68f6059

Please sign in to comment.