OpenEthereum rebranding (#31)

This commit is contained in:
rakita
2020-09-22 14:53:52 +02:00
committed by GitHub
parent 698fa6e8f6
commit 27a0142af1
716 changed files with 4883 additions and 4112 deletions

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use params::SpecType;
use std::num::NonZeroU32;
@@ -47,7 +47,7 @@ pub struct ImportAccounts {
#[cfg(not(feature = "accounts"))]
pub fn execute(_cmd: AccountCmd) -> Result<String, String> {
Err("Account management is deprecated. Please see #9997 for alternatives:\nhttps://github.com/paritytech/parity-ethereum/issues/9997".into())
Err("Account management is deprecated. Please see #9997 for alternatives:\nhttps://github.com/openethereum/openethereum/issues/9997".into())
}
#[cfg(feature = "accounts")]

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::sync::Arc;
@@ -42,7 +42,7 @@ mod accounts {
_cfg: AccountsConfig,
_passwords: &[Password],
) -> Result<AccountProvider, String> {
warn!("Note: Your instance of Parity Ethereum is running without account support. Some CLI options are ignored.");
warn!("Note: Your instance of OpenEthereum is running without account support. Some CLI options are ignored.");
Ok(AccountProvider)
}
@@ -248,7 +248,7 @@ mod accounts {
// Construct an error `String` with an adaptive hint on how to create an account.
fn build_create_account_hint(spec: &SpecType, keys: &str) -> String {
format!("You can create an account via RPC, UI or `parity account new --chain {} --keys-path {}`.", spec, keys)
format!("You can create an account via RPC, UI or `openethereum account new --chain {} --keys-path {}`.", spec, keys)
}
}

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::{fs, io, sync::Arc, time::Instant};
@@ -300,7 +300,7 @@ fn start_client(
// check if fatdb is on
let fat_db = fatdb_switch_to_bool(fat_db, &user_defaults, algorithm)?;
if !fat_db && require_fat_db {
return Err("This command requires Parity to be synced with --fat-db on.".to_owned());
return Err("This command requires OpenEthereum to be synced with --fat-db on.".to_owned());
}
// prepare client and snapshot paths.
@@ -310,7 +310,7 @@ fn start_client(
// execute upgrades
execute_upgrades(&dirs.base, &db_dirs, algorithm, &compaction)?;
// create dirs used by parity
// create dirs used by OpenEthereum.
dirs.create_dirs(false, false)?;
// prepare client config

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::cmp::max;

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
#[macro_use]
mod usage;
@@ -31,7 +31,7 @@ usage! {
CMD cmd_daemon
{
"Use Parity as a daemon",
"Use OpenEthereum as a daemon",
ARG arg_daemon_pid_file: (Option<String>) = None,
"<PID-FILE>",
@@ -277,7 +277,7 @@ usage! {
ARG arg_ports_shift: (u16) = 0u16, or |c: &Config| c.misc.as_ref()?.ports_shift,
"--ports-shift=[SHIFT]",
"Add SHIFT to all port numbers Parity is listening on. Includes network port and all servers (HTTP JSON-RPC, WebSockets JSON-RPC, SecretStore).",
"Add SHIFT to all port numbers OpenEthereum is listening on. Includes network port and all servers (HTTP JSON-RPC, WebSockets JSON-RPC, SecretStore).",
["Account Options"]
FLAG flag_fast_unlock: (bool) = false, or |c: &Config| c.account.as_ref()?.fast_unlock.clone(),
@@ -332,7 +332,7 @@ usage! {
ARG arg_interface: (String) = "all", or |c: &Config| c.network.as_ref()?.interface.clone(),
"--interface=[IP]",
"Network interfaces. Valid values are 'all', 'local' or the ip of the interface you want parity to listen to.",
"Network interfaces. Valid values are 'all', 'local' or the ip of the interface you want OpenEthereum to listen to.",
ARG arg_min_peers: (Option<u16>) = None, or |c: &Config| c.network.as_ref()?.min_peers.clone(),
"--min-peers=[NUM]",
@@ -1037,46 +1037,47 @@ mod tests {
#[test]
fn should_accept_any_argument_order() {
let args = Args::parse(&["parity", "--no-warp", "account", "list"]).unwrap();
let args = Args::parse(&["openethereum", "--no-warp", "account", "list"]).unwrap();
assert_eq!(args.flag_no_warp, true);
let args = Args::parse(&["parity", "account", "list", "--no-warp"]).unwrap();
let args = Args::parse(&["openethereum", "account", "list", "--no-warp"]).unwrap();
assert_eq!(args.flag_no_warp, true);
let args = Args::parse(&["parity", "--chain=dev", "account", "list"]).unwrap();
let args = Args::parse(&["openethereum", "--chain=dev", "account", "list"]).unwrap();
assert_eq!(args.arg_chain, "dev");
let args = Args::parse(&["parity", "account", "list", "--chain=dev"]).unwrap();
let args = Args::parse(&["openethereum", "account", "list", "--chain=dev"]).unwrap();
assert_eq!(args.arg_chain, "dev");
}
#[test]
fn should_reject_invalid_values() {
let args = Args::parse(&["parity", "--jsonrpc-port=8545"]);
let args = Args::parse(&["openethereum", "--jsonrpc-port=8545"]);
assert!(args.is_ok());
let args = Args::parse(&["parity", "--jsonrpc-port=asd"]);
let args = Args::parse(&["openethereum", "--jsonrpc-port=asd"]);
assert!(args.is_err());
}
#[test]
fn should_parse_args_and_flags() {
let args = Args::parse(&["parity", "--no-warp"]).unwrap();
let args = Args::parse(&["openethereum", "--no-warp"]).unwrap();
assert_eq!(args.flag_no_warp, true);
let args = Args::parse(&["parity", "--pruning", "archive"]).unwrap();
let args = Args::parse(&["openethereum", "--pruning", "archive"]).unwrap();
assert_eq!(args.arg_pruning, "archive");
let args = Args::parse(&["parity", "export", "state", "--no-storage"]).unwrap();
let args = Args::parse(&["openethereum", "export", "state", "--no-storage"]).unwrap();
assert_eq!(args.flag_export_state_no_storage, true);
let args = Args::parse(&["parity", "export", "state", "--min-balance", "123"]).unwrap();
let args =
Args::parse(&["openethereum", "export", "state", "--min-balance", "123"]).unwrap();
assert_eq!(args.arg_export_state_min_balance, Some("123".to_string()));
}
#[test]
fn should_exit_gracefully_on_unknown_argument() {
let result = Args::parse(&["parity", "--please-exit-gracefully"]);
let result = Args::parse(&["openethereum", "--please-exit-gracefully"]);
assert!(match result {
Err(ArgsError::Clap(ref clap_error))
if clap_error.kind == ClapErrorKind::UnknownArgument =>
@@ -1087,39 +1088,39 @@ mod tests {
#[test]
fn should_use_subcommand_arg_default() {
let args = Args::parse(&["parity", "export", "state", "--at", "123"]).unwrap();
let args = Args::parse(&["openethereum", "export", "state", "--at", "123"]).unwrap();
assert_eq!(args.arg_export_state_at, "123");
assert_eq!(args.arg_snapshot_at, "latest");
let args = Args::parse(&["parity", "snapshot", "--at", "123", "file.dump"]).unwrap();
let args = Args::parse(&["openethereum", "snapshot", "--at", "123", "file.dump"]).unwrap();
assert_eq!(args.arg_snapshot_at, "123");
assert_eq!(args.arg_export_state_at, "latest");
let args = Args::parse(&["parity", "export", "state"]).unwrap();
let args = Args::parse(&["openethereum", "export", "state"]).unwrap();
assert_eq!(args.arg_snapshot_at, "latest");
assert_eq!(args.arg_export_state_at, "latest");
let args = Args::parse(&["parity", "snapshot", "file.dump"]).unwrap();
let args = Args::parse(&["openethereum", "snapshot", "file.dump"]).unwrap();
assert_eq!(args.arg_snapshot_at, "latest");
assert_eq!(args.arg_export_state_at, "latest");
}
#[test]
fn should_parse_multiple_values() {
let args = Args::parse(&["parity", "account", "import", "~/1", "~/2"]).unwrap();
let args = Args::parse(&["openethereum", "account", "import", "~/1", "~/2"]).unwrap();
assert_eq!(
args.arg_account_import_path,
Some(vec!["~/1".to_owned(), "~/2".to_owned()])
);
let args = Args::parse(&["parity", "account", "import", "~/1,ext"]).unwrap();
let args = Args::parse(&["openethereum", "account", "import", "~/1,ext"]).unwrap();
assert_eq!(
args.arg_account_import_path,
Some(vec!["~/1,ext".to_owned()])
);
let args = Args::parse(&[
"parity",
"openethereum",
"--secretstore-nodes",
"abc@127.0.0.1:3333,cde@10.10.10.10:4444",
])
@@ -1130,7 +1131,7 @@ mod tests {
);
let args = Args::parse(&[
"parity",
"openethereum",
"--password",
"~/.safe/1",
"--password",
@@ -1142,7 +1143,7 @@ mod tests {
vec!["~/.safe/1".to_owned(), "~/.safe/2".to_owned()]
);
let args = Args::parse(&["parity", "--password", "~/.safe/1,~/.safe/2"]).unwrap();
let args = Args::parse(&["openethereum", "--password", "~/.safe/1,~/.safe/2"]).unwrap();
assert_eq!(
args.arg_password,
vec!["~/.safe/1".to_owned(), "~/.safe/2".to_owned()]
@@ -1151,7 +1152,7 @@ mod tests {
#[test]
fn should_parse_global_args_with_subcommand() {
let args = Args::parse(&["parity", "--chain", "dev", "account", "list"]).unwrap();
let args = Args::parse(&["openethereum", "--chain", "dev", "account", "list"]).unwrap();
assert_eq!(args.arg_chain, "dev".to_owned());
}
@@ -1164,7 +1165,7 @@ mod tests {
config.parity = Some(operating);
// when
let args = Args::parse_with_config(&["parity"], config).unwrap();
let args = Args::parse_with_config(&["openethereum"], config).unwrap();
// then
assert_eq!(args.arg_chain, "goerli".to_owned());
@@ -1179,7 +1180,7 @@ mod tests {
config.parity = Some(operating);
// when
let args = Args::parse_with_config(&["parity", "--chain", "xyz"], config).unwrap();
let args = Args::parse_with_config(&["openethereum", "--chain", "xyz"], config).unwrap();
// then
assert_eq!(args.arg_chain, "xyz".to_owned());
@@ -1193,7 +1194,7 @@ mod tests {
config.footprint = Some(footprint);
// when
let args = Args::parse_with_config(&["parity"], config).unwrap();
let args = Args::parse_with_config(&["openethereum"], config).unwrap();
// then
assert_eq!(args.arg_pruning_history, 128);
@@ -1205,7 +1206,7 @@ mod tests {
let config = toml::from_str(include_str!("./tests/config.full.toml")).unwrap();
// when
let args = Args::parse_with_config(&["parity", "--chain", "xyz"], config).unwrap();
let args = Args::parse_with_config(&["openethereum", "--chain", "xyz"], config).unwrap();
// then
assert_eq!(
@@ -1428,7 +1429,7 @@ mod tests {
// -- Miscellaneous Options
flag_version: false,
arg_logging: Some("own_tx=trace".into()),
arg_log_file: Some("/var/log/parity.log".into()),
arg_log_file: Some("/var/log/openethereum.log".into()),
flag_no_color: false,
flag_no_config: false,
}
@@ -1614,7 +1615,7 @@ mod tests {
}),
misc: Some(Misc {
logging: Some("own_tx=trace".into()),
log_file: Some("/var/log/parity.log".into()),
log_file: Some("/var/log/openethereum.log".into()),
color: Some(true),
ports_shift: Some(0),
unsafe_expose: Some(false),
@@ -1626,7 +1627,7 @@ mod tests {
#[test]
fn should_not_accept_min_peers_bigger_than_max_peers() {
match Args::parse(&["parity", "--max-peers=39", "--min-peers=40"]) {
match Args::parse(&["openethereum", "--max-peers=39", "--min-peers=40"]) {
Err(ArgsError::PeerConfiguration) => (),
_ => assert_eq!(false, true),
}
@@ -1634,7 +1635,7 @@ mod tests {
#[test]
fn should_accept_max_peers_equal_or_bigger_than_min_peers() {
Args::parse(&["parity", "--max-peers=40", "--min-peers=40"]).unwrap();
Args::parse(&["parity", "--max-peers=100", "--min-peers=40"]).unwrap();
Args::parse(&["openethereum", "--max-peers=40", "--min-peers=40"]).unwrap();
Args::parse(&["openethereum", "--max-peers=100", "--min-peers=40"]).unwrap();
}
}

View File

@@ -1,11 +1,11 @@
[network]
# Parity will try to maintain connection to at least 50 peers.
# OpenEthereum will try to maintain connection to at least 50 peers.
min_peers = 50
# Parity will maintain at most 100 peers.
# OpenEthereum will maintain at most 100 peers.
max_peers = 100
[ipc]
# You won't be able to use IPC to interact with Parity.
# You won't be able to use IPC to interact with OpenEthereum.
disable = true
[mining]
@@ -15,7 +15,7 @@ force_sealing = true
reseal_on_txs = "all"
# New pending block will be created only once per 4000 milliseconds.
reseal_min_period = 4000
# Parity will keep/relay at most 8192 transactions in queue.
# OpenEthereum will keep/relay at most 8192 transactions in queue.
tx_queue_size = 8192
tx_queue_per_sender = 128

View File

@@ -1,5 +1,5 @@
[network]
# Parity will listen for connections on port 30305.
# OpenEthereum will listen for connections on port 30305.
port = 30305
[rpc]

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::io::{Error, ErrorKind};

View File

@@ -122,5 +122,5 @@ enable = false
[misc]
logging = "own_tx=trace"
log_file = "/var/log/parity.log"
log_file = "/var/log/openethereum.log"
color = true

View File

@@ -69,7 +69,7 @@ enable = false
[misc]
logging = "own_tx=trace"
log_file = "/var/log/parity.log"
log_file = "/var/log/openethereum.log"
color = true
ports_shift = 0
unsafe_expose = false

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
macro_rules! return_if_parse_error {
($e:expr) => {
@@ -395,7 +395,7 @@ macro_rules! usage {
// Subcommands
let mut subcommands_wrapper = Wrapper::new(term_width).subsequent_indent(TAB);
help.push_str("parity [options]\n");
help.push_str("openethereum [options]\n");
$(
{
let mut subc_subc_exist = false;
@@ -413,7 +413,7 @@ macro_rules! usage {
help.push_str(&subcommands_wrapper.fill(
format!(
"parity [options] {} {} {}\n",
"openethereum [options] {} {} {}\n",
underscore_to_hyphen!(&stringify!($subc)[4..]),
underscore_to_hyphen!(&stringify!($subc_subc)[stringify!($subc).len()+1..]),
subc_subc_usages.join(" ")
@@ -434,7 +434,7 @@ macro_rules! usage {
help.push_str(&subcommands_wrapper.fill(
format!(
"parity [options] {} {}\n",
"openethereum [options] {} {}\n",
underscore_to_hyphen!(&stringify!($subc)[4..]),
subc_usages.join(" ")
).as_ref())
@@ -610,7 +610,7 @@ macro_rules! usage {
}
)*
let matches = App::new("Parity")
let matches = App::new("OpenEthereum")
.global_setting(AppSettings::VersionlessSubcommands)
.global_setting(AppSettings::DisableHelpSubcommand)
.max_term_width(MAX_TERM_WIDTH)
@@ -633,7 +633,7 @@ macro_rules! usage {
.about($subc_help)
.args(&subc_usages.get(stringify!($subc)).unwrap().iter().map(|u| Arg::from_usage(u).use_delimiter(false).allow_hyphen_values(true)).collect::<Vec<Arg>>())
$(
.setting(AppSettings::SubcommandRequired) // prevent from running `parity account`
.setting(AppSettings::SubcommandRequired) // prevent from running `openethereum account`
.subcommand(
SubCommand::with_name(&underscore_to_hyphen!(&stringify!($subc_subc)[stringify!($subc).len()+1..]))
.about($subc_subc_help)

View File

@@ -1,6 +1,6 @@
Parity Ethereum Client.
OpenEthereum Client.
By Wood/Paronyan/Kotewicz/Drwięga/Volf/Greeff
Habermeier/Czaban/Gotchac/Redman/Nikolsky
Schoedon/Tang/Adolfsson/Silva/Palm/Hirsz et al.
Copyright 2015-2019 Parity Technologies (UK) Ltd.
Copyright 2015-2020 Parity Technologies (UK) Ltd.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

View File

@@ -1,6 +1,6 @@
Parity Ethereum Client.
OpenEthereum Client.
version {}
Copyright 2015-2019 Parity Technologies (UK) Ltd.
Copyright 2015-2020 Parity Technologies (UK) Ltd.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use ansi_term::Colour;
use bytes::Bytes;
@@ -107,7 +107,7 @@ pub struct Execute {
pub cmd: Cmd,
}
/// Configuration for the Parity client.
/// Configuration for the OpenEthereum client.
#[derive(Debug, PartialEq)]
pub struct Configuration {
/// Arguments to be interpreted.
@@ -120,7 +120,7 @@ impl Configuration {
/// # Example
///
/// ```
/// let _cfg = parity_ethereum::Configuration::parse_cli(&["--light", "--chain", "kovan"]).unwrap();
/// let _cfg = openethereum::Configuration::parse_cli(&["--light", "--chain", "kovan"]).unwrap();
/// ```
pub fn parse_cli<S: AsRef<str>>(command: &[S]) -> Result<Self, ArgsError> {
let config = Configuration {
@@ -1277,14 +1277,14 @@ mod tests {
#[test]
fn test_command_version() {
let args = vec!["parity", "--version"];
let args = vec!["openethereum", "--version"];
let conf = parse(&args);
assert_eq!(conf.into_command().unwrap().cmd, Cmd::Version);
}
#[test]
fn test_command_account_new() {
let args = vec!["parity", "account", "new"];
let args = vec!["openethereum", "account", "new"];
let conf = parse(&args);
assert_eq!(
conf.into_command().unwrap().cmd,
@@ -1299,7 +1299,7 @@ mod tests {
#[test]
fn test_command_account_list() {
let args = vec!["parity", "account", "list"];
let args = vec!["openethereum", "account", "list"];
let conf = parse(&args);
assert_eq!(
conf.into_command().unwrap().cmd,
@@ -1312,7 +1312,7 @@ mod tests {
#[test]
fn test_command_account_import() {
let args = vec!["parity", "account", "import", "my_dir", "another_dir"];
let args = vec!["openethereum", "account", "import", "my_dir", "another_dir"];
let conf = parse(&args);
assert_eq!(
conf.into_command().unwrap().cmd,
@@ -1327,7 +1327,7 @@ mod tests {
#[test]
fn test_command_wallet_import() {
let args = vec![
"parity",
"openethereum",
"wallet",
"import",
"my_wallet.json",
@@ -1349,7 +1349,7 @@ mod tests {
#[test]
fn test_command_blockchain_import() {
let args = vec!["parity", "import", "blockchain.json"];
let args = vec!["openethereum", "import", "blockchain.json"];
let conf = parse(&args);
assert_eq!(
conf.into_command().unwrap().cmd,
@@ -1376,7 +1376,7 @@ mod tests {
#[test]
fn test_command_blockchain_export() {
let args = vec!["parity", "export", "blocks", "blockchain.json"];
let args = vec!["openethereum", "export", "blocks", "blockchain.json"];
let conf = parse(&args);
assert_eq!(
conf.into_command().unwrap().cmd,
@@ -1402,7 +1402,7 @@ mod tests {
#[test]
fn test_command_state_export() {
let args = vec!["parity", "export", "state", "state.json"];
let args = vec!["openethereum", "export", "state", "state.json"];
let conf = parse(&args);
assert_eq!(
conf.into_command().unwrap().cmd,
@@ -1431,7 +1431,7 @@ mod tests {
#[test]
fn test_command_blockchain_export_with_custom_format() {
let args = vec![
"parity",
"openethereum",
"export",
"blocks",
"--format",
@@ -1463,7 +1463,7 @@ mod tests {
#[test]
fn test_command_signer_new_token() {
let args = vec!["parity", "signer", "new-token"];
let args = vec!["openethereum", "signer", "new-token"];
let conf = parse(&args);
let expected = Directories::default().signer;
assert_eq!(
@@ -1495,7 +1495,7 @@ mod tests {
#[test]
fn test_ws_max_connections() {
let args = vec!["parity", "--ws-max-connections", "1"];
let args = vec!["openethereum", "--ws-max-connections", "1"];
let conf = parse(&args);
assert_eq!(
@@ -1509,7 +1509,7 @@ mod tests {
#[test]
fn test_run_cmd() {
let args = vec!["parity"];
let args = vec!["openethereum"];
let conf = parse(&args);
let mut expected = RunCmd {
allow_missing_blocks: false,
@@ -1564,8 +1564,8 @@ mod tests {
let mut mining_options = MinerOptions::default();
// when
let conf0 = parse(&["parity"]);
let conf2 = parse(&["parity", "--tx-queue-strategy", "gas_price"]);
let conf0 = parse(&["openethereum"]);
let conf2 = parse(&["openethereum", "--tx-queue-strategy", "gas_price"]);
// then
assert_eq!(conf0.miner_options().unwrap(), mining_options);
@@ -1576,7 +1576,7 @@ mod tests {
#[test]
fn should_fail_on_force_reseal_and_reseal_min_period() {
let conf = parse(&[
"parity",
"openethereum",
"--chain",
"dev",
"--force-sealing",
@@ -1592,7 +1592,13 @@ mod tests {
// given
// when
let conf = parse(&["parity", "--chain", "goerli", "--identity", "testname"]);
let conf = parse(&[
"openethereum",
"--chain",
"goerli",
"--identity",
"testname",
]);
// then
assert_eq!(
@@ -1614,10 +1620,10 @@ mod tests {
// given
// when
let conf0 = parse(&["parity"]);
let conf1 = parse(&["parity", "--jsonrpc-hosts", "none"]);
let conf2 = parse(&["parity", "--jsonrpc-hosts", "all"]);
let conf3 = parse(&["parity", "--jsonrpc-hosts", "parity.io,something.io"]);
let conf0 = parse(&["openethereum"]);
let conf1 = parse(&["openethereum", "--jsonrpc-hosts", "none"]);
let conf2 = parse(&["openethereum", "--jsonrpc-hosts", "all"]);
let conf3 = parse(&["openethereum", "--jsonrpc-hosts", "parity.io,something.io"]);
// then
assert_eq!(conf0.rpc_hosts(), Some(Vec::new()));
@@ -1634,7 +1640,7 @@ mod tests {
// given
// when
let conf0 = parse(&["parity", "--ui-path=signer"]);
let conf0 = parse(&["openethereum", "--ui-path=signer"]);
// then
assert_eq!(conf0.directories().signer, "signer".to_owned());
@@ -1648,7 +1654,11 @@ mod tests {
.unwrap()
.write_all(b" \n\t\n")
.unwrap();
let args = vec!["parity", "--reserved-peers", filename.to_str().unwrap()];
let args = vec![
"openethereum",
"--reserved-peers",
filename.to_str().unwrap(),
];
let conf = Configuration::parse_cli(&args).unwrap();
assert!(conf.init_reserved_nodes().is_ok());
}
@@ -1658,7 +1668,11 @@ mod tests {
let tempdir = TempDir::new("").unwrap();
let filename = tempdir.path().join("peers_comments");
File::create(&filename).unwrap().write_all(b"# Sample comment\nenode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@172.0.0.1:30303\n").unwrap();
let args = vec!["parity", "--reserved-peers", filename.to_str().unwrap()];
let args = vec![
"openethereum",
"--reserved-peers",
filename.to_str().unwrap(),
];
let conf = Configuration::parse_cli(&args).unwrap();
let reserved_nodes = conf.init_reserved_nodes();
assert!(reserved_nodes.is_ok());
@@ -1667,7 +1681,7 @@ mod tests {
#[test]
fn test_dev_preset() {
let args = vec!["parity", "--config", "dev"];
let args = vec!["openethereum", "--config", "dev"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1681,7 +1695,7 @@ mod tests {
#[test]
fn test_mining_preset() {
let args = vec!["parity", "--config", "mining"];
let args = vec!["openethereum", "--config", "mining"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1705,7 +1719,7 @@ mod tests {
#[test]
fn test_non_standard_ports_preset() {
let args = vec!["parity", "--config", "non-standard-ports"];
let args = vec!["openethereum", "--config", "non-standard-ports"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1718,7 +1732,7 @@ mod tests {
#[test]
fn test_insecure_preset() {
let args = vec!["parity", "--config", "insecure"];
let args = vec!["openethereum", "--config", "insecure"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1736,7 +1750,7 @@ mod tests {
#[test]
fn test_dev_insecure_preset() {
let args = vec!["parity", "--config", "dev-insecure"];
let args = vec!["openethereum", "--config", "dev-insecure"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1757,7 +1771,7 @@ mod tests {
#[test]
fn test_override_preset() {
let args = vec!["parity", "--config", "mining", "--min-peers=99"];
let args = vec!["openethereum", "--config", "mining", "--min-peers=99"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1769,7 +1783,7 @@ mod tests {
#[test]
fn test_identity_arg() {
let args = vec!["parity", "--identity", "Somebody"];
let args = vec!["openethereum", "--identity", "Somebody"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1777,7 +1791,7 @@ mod tests {
assert!(c
.net_conf
.client_version
.starts_with("Parity-Ethereum/Somebody/"));
.starts_with("OpenEthereum/Somebody/"));
}
_ => panic!("Should be Cmd::Run"),
}
@@ -1788,8 +1802,14 @@ mod tests {
// given
// when
let conf0 = parse(&["parity", "--ports-shift", "1", "--stratum"]);
let conf1 = parse(&["parity", "--ports-shift", "1", "--jsonrpc-port", "8544"]);
let conf0 = parse(&["openethereum", "--ports-shift", "1", "--stratum"]);
let conf1 = parse(&[
"openethereum",
"--ports-shift",
"1",
"--jsonrpc-port",
"8544",
]);
// then
assert_eq!(conf0.net_addresses().unwrap().0.port(), 30304);
@@ -1813,7 +1833,7 @@ mod tests {
#[test]
fn should_resolve_external_nat_hosts() {
// Ip works
let conf = parse(&["parity", "--nat", "extip:1.1.1.1"]);
let conf = parse(&["openethereum", "--nat", "extip:1.1.1.1"]);
assert_eq!(
conf.net_addresses().unwrap().1.unwrap().ip().to_string(),
"1.1.1.1"
@@ -1821,7 +1841,7 @@ mod tests {
assert_eq!(conf.net_addresses().unwrap().1.unwrap().port(), 30303);
// Ip with port works, port is discarded
let conf = parse(&["parity", "--nat", "extip:192.168.1.1:123"]);
let conf = parse(&["openethereum", "--nat", "extip:192.168.1.1:123"]);
assert_eq!(
conf.net_addresses().unwrap().1.unwrap().ip().to_string(),
"192.168.1.1"
@@ -1829,17 +1849,21 @@ mod tests {
assert_eq!(conf.net_addresses().unwrap().1.unwrap().port(), 30303);
// Hostname works
let conf = parse(&["parity", "--nat", "extip:ethereum.org"]);
let conf = parse(&["openethereum", "--nat", "extip:ethereum.org"]);
assert!(conf.net_addresses().unwrap().1.is_some());
assert_eq!(conf.net_addresses().unwrap().1.unwrap().port(), 30303);
// Hostname works, garbage at the end is discarded
let conf = parse(&["parity", "--nat", "extip:ethereum.org:whatever bla bla 123"]);
let conf = parse(&[
"openethereum",
"--nat",
"extip:ethereum.org:whatever bla bla 123",
]);
assert!(conf.net_addresses().unwrap().1.is_some());
assert_eq!(conf.net_addresses().unwrap().1.unwrap().port(), 30303);
// Garbage is error
let conf = parse(&["parity", "--nat", "extip:blabla"]);
let conf = parse(&["openethereum", "--nat", "extip:blabla"]);
assert!(conf.net_addresses().is_err());
}
@@ -1848,7 +1872,7 @@ mod tests {
// given
// when
let conf0 = parse(&["parity", "--unsafe-expose"]);
let conf0 = parse(&["openethereum", "--unsafe-expose"]);
// then
assert_eq!(&conf0.network_settings().unwrap().rpc_interface, "0.0.0.0");
@@ -1866,12 +1890,16 @@ mod tests {
#[test]
fn allow_ips() {
let all = parse(&["parity", "--allow-ips", "all"]);
let private = parse(&["parity", "--allow-ips", "private"]);
let block_custom = parse(&["parity", "--allow-ips", "-10.0.0.0/8"]);
let combo = parse(&["parity", "--allow-ips", "public 10.0.0.0/8 -1.0.0.0/8"]);
let ipv6_custom_public = parse(&["parity", "--allow-ips", "public fc00::/7"]);
let ipv6_custom_private = parse(&["parity", "--allow-ips", "private -fc00::/7"]);
let all = parse(&["openethereum", "--allow-ips", "all"]);
let private = parse(&["openethereum", "--allow-ips", "private"]);
let block_custom = parse(&["openethereum", "--allow-ips", "-10.0.0.0/8"]);
let combo = parse(&[
"openethereum",
"--allow-ips",
"public 10.0.0.0/8 -1.0.0.0/8",
]);
let ipv6_custom_public = parse(&["openethereum", "--allow-ips", "public fc00::/7"]);
let ipv6_custom_private = parse(&["openethereum", "--allow-ips", "private -fc00::/7"]);
assert_eq!(
all.ip_filter().unwrap(),
@@ -1932,8 +1960,8 @@ mod tests {
fn should_use_correct_cache_path_if_base_is_set() {
use std::path;
let std = parse(&["parity"]);
let base = parse(&["parity", "--base-path", "/test"]);
let std = parse(&["openethereum"]);
let base = parse(&["openethereum", "--base-path", "/test"]);
let base_path = ::dir::default_data_path();
let local_path = ::dir::default_local_path();
@@ -1949,7 +1977,7 @@ mod tests {
#[test]
fn should_respect_only_max_peers_and_default() {
let args = vec!["parity", "--max-peers=50"];
let args = vec!["openethereum", "--max-peers=50"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1962,7 +1990,7 @@ mod tests {
#[test]
fn should_respect_only_max_peers_less_than_default() {
let args = vec!["parity", "--max-peers=5"];
let args = vec!["openethereum", "--max-peers=5"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1975,7 +2003,7 @@ mod tests {
#[test]
fn should_respect_only_min_peers_and_default() {
let args = vec!["parity", "--min-peers=5"];
let args = vec!["openethereum", "--min-peers=5"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
@@ -1988,7 +2016,7 @@ mod tests {
#[test]
fn should_respect_only_min_peers_and_greater_than_default() {
let args = vec!["parity", "--min-peers=500"];
let args = vec!["openethereum", "--min-peers=500"];
let conf = Configuration::parse_cli(&args).unwrap();
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Database-related operations.

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Blooms migration from rocksdb to blooms-db

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use super::kvdb_rocksdb::{CompactionProfile, DatabaseConfig};
use ethcore::client::{ClientConfig, DatabaseCompactionProfile};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use super::{
kvdb_rocksdb::{CompactionProfile, DatabaseConfig},

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
extern crate ethcore_blockchain;
extern crate kvdb_rocksdb;

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use cache::CacheConfig;
use db::migrate;
@@ -42,7 +42,7 @@ pub fn to_duration(s: &str) -> Result<Duration, String> {
fn to_seconds(s: &str) -> Result<u64, String> {
let bad = |_| {
format!(
"{}: Invalid duration given. See parity --help for more information.",
"{}: Invalid duration given. See openethereum --help for more information.",
s
)
};
@@ -310,7 +310,7 @@ pub fn execute_upgrades(
debug!("Executed {} upgrade scripts - ok", upgrades_applied);
}
Err(e) => {
return Err(format!("Error upgrading parity data: {:?}", e));
return Err(format!("Error upgrading OpenEthereum data: {:?}", e));
}
_ => {}
}

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
extern crate ansi_term;
use self::ansi_term::{

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Ethcore client application.
#![warn(missing_docs)]
@@ -170,7 +170,7 @@ fn run_deadlock_detection_thread() {
});
}
/// Action that Parity performed when running `start`.
/// Action that OpenEthereum performed when running `start`.
pub enum ExecutionAction {
/// The execution didn't require starting a node, and thus has finished.
/// Contains the string to print on stdout, if any.
@@ -226,13 +226,13 @@ fn execute(command: Execute, logger: Arc<RotatingLogger>) -> Result<ExecutionAct
}
}
/// Starts the parity client.
/// Starts the OpenEthereum client.
///
/// The first parameter is the command line arguments that you would pass when running the parity
/// The first parameter is the command line arguments that you would pass when running the openethereum
/// binary.
///
/// On error, returns what to print on stderr.
// FIXME: totally independent logging capability, see https://github.com/paritytech/parity-ethereum/issues/10252
// FIXME: totally independent logging capability, see https://github.com/openethereum/openethereum/issues/10252
pub fn start(conf: Configuration, logger: Arc<RotatingLogger>) -> Result<ExecutionAction, String> {
execute(conf.into_command()?, logger)
}

View File

@@ -1,20 +1,20 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Logger for parity executables
//! Logger for OpenEthereum executables
extern crate ansi_term;
extern crate arrayvec;

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Common log helper functions

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Ethcore client application.
@@ -24,9 +24,9 @@ extern crate fdlimit;
#[macro_use]
extern crate log;
extern crate ansi_term;
extern crate openethereum;
extern crate panic_hook;
extern crate parity_daemonize;
extern crate parity_ethereum;
extern crate parking_lot;
extern crate ethcore_logger;
@@ -46,8 +46,8 @@ use ansi_term::Colour;
use ctrlc::CtrlC;
use ethcore_logger::setup_log;
use fdlimit::raise_fd_limit;
use openethereum::{start, ExecutionAction};
use parity_daemonize::AsHandle;
use parity_ethereum::{start, ExecutionAction};
use parking_lot::{Condvar, Mutex};
#[derive(Debug)]
@@ -62,7 +62,7 @@ struct ExitStatus {
fn main() -> Result<(), i32> {
let conf = {
let args = std::env::args().collect::<Vec<_>>();
parity_ethereum::Configuration::parse_cli(&args).unwrap_or_else(|e| e.exit())
openethereum::Configuration::parse_cli(&args).unwrap_or_else(|e| e.exit())
};
let logger = setup_log(&conf.logger_config()).unwrap_or_else(|e| {

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::sync::{mpsc, Arc};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::{collections::HashSet, fmt, fs, num::NonZeroU32, str, time::Duration};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use ethkey::Password;
use ethstore::PresaleWallet;

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::{collections::HashSet, io, path::PathBuf, sync::Arc};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::{cmp::PartialEq, collections::HashSet, str::FromStr, sync::Arc};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::{
any::Any,

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use account_utils::AccountProvider;
use dir::{default_data_path, helpers::replace_home};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use std::{
io,

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Snapshot and restoration commands.

View File

@@ -1,20 +1,20 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Parity sync service
//! OpenEthereum sync service
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
//! Parity upgrade logic

View File

@@ -1,18 +1,18 @@
// Copyright 2015-2019 Parity Technologies (UK) Ltd.
// This file is part of Parity Ethereum.
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of OpenEthereum.
// Parity Ethereum is free software: you can redistribute it and/or modify
// OpenEthereum is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Ethereum is distributed in the hope that it will be useful,
// OpenEthereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Ethereum. If not, see <http://www.gnu.org/licenses/>.
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
use ethcore::client::Mode as ClientMode;
use journaldb::Algorithm;