Parity Ethereum 2.0.0 (#9052)

* parity-version: major bump to 2.0.0 🎉

* parity-ethereum: rename crate 🌵

* ethcore: only accept service transactions from parity-ethereum nodes

* parity: fix --identity tests

* rpc: fix sync provider in tests

* rpc: fix parity_net_peers test

* ethcore-sync: accept service transactions from parity and parity-ethereum

* ethcore-sync: fix indentation

* ethcore-sync: split the ifs to reduce code redundancy

* ethcore-sync: fix syntax

* Fix building ethcore

* update cargo.lock

* parity-version: major bump to 2.0.0 tada

* fix merge
This commit is contained in:
Afri Schoedon
2018-07-11 13:35:10 +02:00
committed by GitHub
parent c082af6f74
commit 484ecfaf47
11 changed files with 96 additions and 90 deletions

View File

@@ -102,7 +102,7 @@ impl Configuration {
/// # Example
///
/// ```
/// let _cfg = parity::Configuration::parse_cli(&["--light", "--chain", "kovan"]).unwrap();
/// let _cfg = parity_ethereum::Configuration::parse_cli(&["--light", "--chain", "kovan"]).unwrap();
/// ```
pub fn parse_cli<S: AsRef<str>>(command: &[S]) -> Result<Self, ArgsError> {
let config = Configuration {
@@ -722,7 +722,7 @@ impl Configuration {
ret.client_version = {
let mut client_version = version();
if !self.args.arg_identity.is_empty() {
// Insert name after the "Parity/" at the beginning of version string.
// Insert name after the "Parity-Ethereum/" at the beginning of version string.
let idx = client_version.find('/').unwrap_or(client_version.len());
client_version.insert_str(idx, &format!("/{}", self.args.arg_identity));
}
@@ -1740,7 +1740,7 @@ mod tests {
match conf.into_command().unwrap().cmd {
Cmd::Run(c) => {
assert_eq!(c.name, "Somebody");
assert!(c.net_conf.client_version.starts_with("Parity/Somebody/"));
assert!(c.net_conf.client_version.starts_with("Parity-Ethereum/Somebody/"));
}
_ => panic!("Should be Cmd::Run"),
}