Merge branch 'master' into kill_unwraps

This commit is contained in:
Gav Wood
2016-07-07 09:40:12 +02:00
32 changed files with 362 additions and 158 deletions

View File

@@ -25,6 +25,7 @@ transient-hashmap = "0.1"
serde_macros = { version = "0.7.0", optional = true }
clippy = { version = "0.0.78", optional = true}
json-ipc-server = { git = "https://github.com/ethcore/json-ipc-server.git" }
ethcore-ipc = { path = "../ipc/rpc" }
[build-dependencies]
serde_codegen = { version = "0.7.0", optional = true }

View File

@@ -32,6 +32,7 @@ extern crate ethcore;
extern crate ethsync;
extern crate transient_hashmap;
extern crate json_ipc_server as ipc;
extern crate ethcore_ipc;
#[cfg(test)]
extern crate ethjson;

View File

@@ -31,6 +31,7 @@ use util::rlp::{encode, decode, UntrustedRlp, View};
use util::Lockable;
use ethcore::account_provider::AccountProvider;
use ethcore::client::{MiningBlockChainClient, BlockID, TransactionID, UncleID};
use ethcore::header::Header as BlockHeader;
use ethcore::block::IsBlock;
use ethcore::views::*;
use ethcore::ethereum::Ethash;
@@ -43,7 +44,6 @@ use v1::types::{Block, BlockTransactions, BlockNumber, Bytes, SyncStatus, SyncIn
use v1::helpers::CallRequest as CRequest;
use v1::impls::{default_gas_price, dispatch_transaction, error_codes};
use serde;
use ethcore::header::Header as BlockHeader;
/// Eth rpc implementation.
pub struct EthClient<C, S, M, EM> where

View File

@@ -84,7 +84,7 @@ impl Into<EthFilter> for Filter {
VariadicValue::Single(t) => Some(vec![t.into()]),
VariadicValue::Multiple(t) => Some(t.into_iter().map(Into::into).collect())
}).filter_map(|m| m).collect()).into_iter();
[iter.next(), iter.next(), iter.next(), iter.next()]
vec![iter.next(), iter.next(), iter.next(), iter.next()]
}
}
}

View File

@@ -162,7 +162,7 @@ pub enum Diff<T> where T: Serialize {
Changed(ChangedType<T>),
}
impl<T, U> From<account_diff::Diff<T>> for Diff<U> where T: Eq, U: Serialize + From<T> {
impl<T, U> From<account_diff::Diff<T>> for Diff<U> where T: Eq + ::ethcore_ipc::BinaryConvertable, U: Serialize + From<T> {
fn from(c: account_diff::Diff<T>) -> Self {
match c {
account_diff::Diff::Same => Diff::Same,
@@ -205,7 +205,7 @@ impl Serialize for StateDiff {
impl From<state_diff::StateDiff> for StateDiff {
fn from(c: state_diff::StateDiff) -> Self {
StateDiff(c.0.into_iter().map(|(k, v)| (k.into(), v.into())).collect())
StateDiff(c.raw.into_iter().map(|(k, v)| (k.into(), v.into())).collect())
}
}