Merge branch 'master' of github.com:ethcore/parity into move_hash

This commit is contained in:
debris
2016-08-05 10:53:34 +02:00
67 changed files with 468 additions and 348 deletions

View File

@@ -28,6 +28,7 @@ evmjit = { path = "../evmjit", optional = true }
clippy = { version = "0.0.80", optional = true}
ethash = { path = "../ethash" }
ethcore-util = { path = "../util" }
ethcore-io = { path = "../util/io" }
ethcore-devtools = { path = "../devtools" }
ethjson = { path = "../json" }
ethcore-ipc = { path = "../ipc/rpc" }

View File

@@ -38,10 +38,10 @@
"stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"
},
"nodes": [
"enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303",
"enode://de471bccee3d042261d52e9bff31458daecc406142b401d4cd848f677479f73104b9fdeb090af9583d3391b7f10cb2ba9e26865dd5fca4fcdc0fb1e3b723c786@54.94.239.50:30303",
"enode://1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082@52.74.57.123:30303",
"enode://248f12bc8b18d5289358085520ac78cd8076485211e6d96ab0bc93d6cd25442db0ce3a937dc404f64f207b0b9aed50e25e98ce32af5ac7cb321ff285b97de485@zero.parity.io:30303"
"enode://e809c4a2fec7daed400e5e28564e23693b23b2cc5a019b612505631bbe7b9ccf709c1796d2a3d29ef2b045f210caf51e3c4f5b6d3587d43ad5d6397526fa6179@174.112.32.157:30303",
"enode://687be94c3a7beaa3d2fde82fa5046cdeb3e8198354e05b29d6e0d4e276713e3707ac10f784a7904938b06b46c764875c241b0337dd853385a4d8bfcbf8190647@95.183.51.229:30303",
"enode://6e538e7c1280f0a31ff08b382db5302480f775480b8e68f8febca0ceff81e4b19153c6f8bf60313b93bef2cc34d34e1df41317de0ce613a201d1660a788a03e2@52.206.67.235:30303",
"enode://217ebe27e89bf4fec8ce06509323ff095b1014378deb75ab2e5f6759a4e8750a3bd8254b8c6833136e4d5e58230d65ee8ab34a5db5abf0640408c4288af3c8a7@188.138.1.237:30303"
],
"accounts": {
"0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },

View File

@@ -20,6 +20,7 @@ use std::thread::{JoinHandle, self};
use std::sync::atomic::{AtomicBool, Ordering as AtomicOrdering};
use std::sync::{Condvar as SCondvar, Mutex as SMutex};
use util::*;
use io::*;
use verification::*;
use error::*;
use engines::Engine;
@@ -27,7 +28,6 @@ use views::*;
use header::*;
use service::*;
use client::BlockStatus;
use util::panics::*;
pub use types::block_queue_info::BlockQueueInfo;
@@ -450,6 +450,7 @@ impl Drop for BlockQueue {
#[cfg(test)]
mod tests {
use util::*;
use io::*;
use spec::*;
use block_queue::*;
use tests::helpers::*;

View File

@@ -27,12 +27,11 @@ use util::{journaldb, rlp, Bytes, View, PerfTimer, Itertools, Mutex, RwLock};
use util::journaldb::JournalDB;
use util::rlp::{UntrustedRlp};
use util::{U256, H256, Address, H2048, Uint};
use util::panics::*;
use util::io::*;
use util::sha3::*;
use util::kvdb::*;
// other
use io::*;
use views::{BlockView, HeaderView, BodyView};
use error::{ImportError, ExecutionError, CallError, BlockError, ImportResult};
use header::BlockNumber;

View File

@@ -17,6 +17,7 @@
//! General error types for use in ethcore.
use util::*;
use io::*;
use header::BlockNumber;
use basic_types::LogBloom;
use client::Error as ClientError;
@@ -227,8 +228,10 @@ pub enum Error {
PowInvalid,
/// Error concerning TrieDBs
Trie(TrieError),
/// Io error.
Io(::std::io::Error),
/// Io crate error.
Io(IoError),
/// Standard io error.
StdIo(::std::io::Error),
/// Snappy error.
Snappy(::util::snappy::InvalidInput),
}
@@ -238,6 +241,7 @@ impl fmt::Display for Error {
match *self {
Error::Client(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Util(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Io(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Block(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Execution(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Transaction(ref err) => f.write_fmt(format_args!("{}", err)),
@@ -247,7 +251,7 @@ impl fmt::Display for Error {
Error::PowHashInvalid => f.write_str("Invalid or out of date PoW hash."),
Error::PowInvalid => f.write_str("Invalid nonce or mishash"),
Error::Trie(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Io(ref err) => f.write_fmt(format_args!("{}", err)),
Error::StdIo(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Snappy(ref err) => f.write_fmt(format_args!("{}", err)),
}
}
@@ -309,7 +313,7 @@ impl From<UtilError> for Error {
impl From<IoError> for Error {
fn from(err: IoError) -> Error {
Error::Util(From::from(err))
Error::Io(err)
}
}
@@ -321,7 +325,7 @@ impl From<TrieError> for Error {
impl From<::std::io::Error> for Error {
fn from(err: ::std::io::Error) -> Error {
Error::Io(err)
Error::StdIo(err)
}
}

View File

@@ -24,6 +24,7 @@ use spec::Genesis;
use ethjson;
use ethjson::blockchain::BlockChain;
use miner::Miner;
use io::IoChannel;
pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
init_log();

View File

@@ -77,6 +77,7 @@
#[macro_use] extern crate log;
#[macro_use] extern crate ethcore_util as util;
extern crate ethcore_io as io;
#[macro_use] extern crate lazy_static;
extern crate rustc_serialize;
#[macro_use] extern crate heapsize;

View File

@@ -27,7 +27,6 @@
//! extern crate ethcore_util as util;
//! extern crate ethcore;
//! use std::env;
//! use util::network::{NetworkService, NetworkConfiguration};
//! use ethcore::ethereum;
//! use ethcore::client::{Client, ClientConfig};
//! use ethcore::miner::{Miner, MinerService};

View File

@@ -17,7 +17,7 @@
//! Creates and registers client and network services.
use util::*;
use util::panics::*;
use io::*;
use spec::Spec;
use error::*;
use client::{Client, ClientConfig, ChainNotify};

View File

@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use io::IoChannel;
use client::{BlockChainClient, MiningBlockChainClient, Client, ClientConfig, BlockID};
use block::IsBlock;
use tests::helpers::*;

View File

@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use io::*;
use client::{self, BlockChainClient, Client, ClientConfig};
use common::*;
use spec::*;

View File

@@ -24,7 +24,7 @@ use tests::helpers::*;
use devtools::*;
use miner::Miner;
use crossbeam;
use common::IoChannel;
use io::IoChannel;
pub fn run_test_worker(scope: &crossbeam::Scope, stop: Arc<AtomicBool>, socket_path: &str) {
let socket_path = socket_path.to_owned();