Extract blockchain from ethcore (#10114)
* Split blockchain & db from ethcore. * Clean up blockchain deps. * Missing docs. * Fix blockchain tests. * Make other crates compile. * Remove some re-exports. * Remove types re-export from ethcore. * Remove EVM dependency from transaction. * Merge ethcore-transaction with common-types. * Clean-up ethcore deps a bit. * remove ethcore from cargo.toml * Update ethcore/blockchain/src/lib.rs Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Address review comments. * Update DB comment. * Add tracking issue to the TODO and fix typo. * Common naming for common types. * Update ethcore/db/src/keys.rs Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Update ethcore/blockchain/src/generator.rs Co-Authored-By: tomusdrw <tomusdrw@users.noreply.github.com> * Try to fix beta tests.
This commit is contained in:
committed by
Afri Schoedon
parent
3090324366
commit
3650f2d51c
@@ -41,6 +41,7 @@ extern crate jsonrpc_http_server as http;
|
||||
extern crate jsonrpc_ipc_server as ipc;
|
||||
extern crate jsonrpc_pubsub;
|
||||
|
||||
extern crate common_types as types;
|
||||
extern crate ethash;
|
||||
extern crate ethcore;
|
||||
extern crate fastmap;
|
||||
@@ -52,7 +53,6 @@ extern crate ethcore_logger;
|
||||
extern crate ethcore_miner as miner;
|
||||
extern crate ethcore_private_tx;
|
||||
extern crate ethcore_sync as sync;
|
||||
extern crate ethcore_transaction as transaction;
|
||||
extern crate ethereum_types;
|
||||
extern crate ethkey;
|
||||
extern crate ethstore;
|
||||
|
||||
@@ -32,13 +32,13 @@ use stats::Corpus;
|
||||
|
||||
use crypto::DEFAULT_MAC;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::basic_account::BasicAccount;
|
||||
use ethcore::client::BlockChainClient;
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethkey::{Password, Signature};
|
||||
use sync::LightSync;
|
||||
use transaction::{Action, SignedTransaction, PendingTransaction, Transaction, Error as TransactionError};
|
||||
use types::transaction::{Action, SignedTransaction, PendingTransaction, Transaction, Error as TransactionError};
|
||||
use types::basic_account::BasicAccount;
|
||||
use types::ids::BlockId;
|
||||
|
||||
use jsonrpc_core::{BoxFuture, Result, Error};
|
||||
use jsonrpc_core::futures::{future, Future, Poll, Async};
|
||||
|
||||
@@ -23,12 +23,12 @@ use ethcore::error::{Error as EthcoreError, ErrorKind, CallError};
|
||||
use ethcore::client::BlockId;
|
||||
use jsonrpc_core::{futures, Result as RpcResult, Error, ErrorCode, Value};
|
||||
use rlp::DecoderError;
|
||||
use transaction::Error as TransactionError;
|
||||
use types::transaction::Error as TransactionError;
|
||||
use ethcore_private_tx::Error as PrivateTransactionError;
|
||||
use vm::Error as VMError;
|
||||
use light::on_demand::error::{Error as OnDemandError, ErrorKind as OnDemandErrorKind};
|
||||
use ethcore::client::BlockChainClient;
|
||||
use ethcore::blockchain_info::BlockChainInfo;
|
||||
use types::blockchain_info::BlockChainInfo;
|
||||
use v1::types::BlockNumber;
|
||||
|
||||
mod codes {
|
||||
|
||||
@@ -14,7 +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 transaction::{Transaction, SignedTransaction, Action};
|
||||
use types::transaction::{Transaction, SignedTransaction, Action};
|
||||
|
||||
use ethereum_types::U256;
|
||||
use jsonrpc_core::Error;
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
use std::cmp;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::basic_account::BasicAccount;
|
||||
use ethcore::encoded;
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::receipt::Receipt;
|
||||
use types::basic_account::BasicAccount;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
use types::ids::BlockId;
|
||||
use types::receipt::Receipt;
|
||||
use ethcore::executed::ExecutionError;
|
||||
|
||||
use jsonrpc_core::{Result, Error};
|
||||
@@ -47,7 +47,7 @@ use hash::H256;
|
||||
use parking_lot::Mutex;
|
||||
use fastmap::H256FastMap;
|
||||
use std::collections::BTreeMap;
|
||||
use transaction::{Action, Transaction as EthTransaction, PendingTransaction, SignedTransaction, LocalizedTransaction};
|
||||
use types::transaction::{Action, Transaction as EthTransaction, PendingTransaction, SignedTransaction, LocalizedTransaction};
|
||||
|
||||
use v1::helpers::{CallRequest as CallRequestHelper, errors, dispatch};
|
||||
use v1::types::{BlockNumber, CallRequest, Log, Transaction};
|
||||
|
||||
@@ -22,8 +22,8 @@ use std::{
|
||||
};
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::Mutex;
|
||||
use ethcore::filter::Filter;
|
||||
use v1::types::Log;
|
||||
use types::filter::Filter;
|
||||
|
||||
pub type BlockNumber = u64;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethcore::client::BlockChainClient;
|
||||
use transaction::LocalizedTransaction;
|
||||
use types::transaction::LocalizedTransaction;
|
||||
|
||||
use jsonrpc_core::Result;
|
||||
use v1::traits::Debug;
|
||||
|
||||
@@ -27,15 +27,15 @@ use parking_lot::Mutex;
|
||||
use ethash::{self, SeedHashCompute};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{BlockChainClient, BlockId, TransactionId, UncleId, StateOrBlock, StateClient, StateInfo, Call, EngineInfo, ProvingBlockChainClient};
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::header::{BlockNumber as EthBlockNumber};
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethcore::snapshot::SnapshotService;
|
||||
use ethcore::encoded;
|
||||
use sync::SyncProvider;
|
||||
use miner::external::ExternalMinerService;
|
||||
use transaction::{SignedTransaction, LocalizedTransaction};
|
||||
use hash::keccak;
|
||||
use miner::external::ExternalMinerService;
|
||||
use sync::SyncProvider;
|
||||
use types::transaction::{SignedTransaction, LocalizedTransaction};
|
||||
use types::BlockNumber as EthBlockNumber;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use jsonrpc_core::futures::future;
|
||||
@@ -466,7 +466,7 @@ pub fn pending_logs<M>(miner: &M, best_block: EthBlockNumber, filter: &EthcoreFi
|
||||
}
|
||||
|
||||
fn check_known<C>(client: &C, number: BlockNumber) -> Result<()> where C: BlockChainClient {
|
||||
use ethcore::block_status::BlockStatus;
|
||||
use types::block_status::BlockStatus;
|
||||
|
||||
let id = match number {
|
||||
BlockNumber::Pending => return Ok(()),
|
||||
@@ -625,7 +625,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> Eth for EthClient<
|
||||
Box::new(future::done(res))
|
||||
}
|
||||
|
||||
|
||||
|
||||
fn storage_at(&self, address: RpcH160, pos: RpcU256, num: Trailing<BlockNumber>) -> BoxFuture<RpcH256> {
|
||||
let address: Address = RpcH160::into(address);
|
||||
let position: U256 = RpcU256::into(pos);
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
use std::sync::Arc;
|
||||
use std::collections::{BTreeSet, VecDeque};
|
||||
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::client::{BlockChainClient, BlockId};
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethereum_types::H256;
|
||||
use parking_lot::Mutex;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use jsonrpc_core::futures::{future, Future};
|
||||
|
||||
@@ -31,16 +31,16 @@ use v1::metadata::Metadata;
|
||||
use v1::traits::EthPubSub;
|
||||
use v1::types::{pubsub, RichHeader, Log};
|
||||
|
||||
use ethcore::encoded;
|
||||
use ethcore::filter::Filter as EthFilter;
|
||||
use ethcore::client::{BlockChainClient, ChainNotify, NewBlocks, ChainRouteType, BlockId};
|
||||
use sync::LightSync;
|
||||
use light::cache::Cache;
|
||||
use light::on_demand::OnDemand;
|
||||
use light::client::{LightChainClient, LightChainNotify};
|
||||
use parity_runtime::Executor;
|
||||
use ethereum_types::H256;
|
||||
use light::cache::Cache;
|
||||
use light::client::{LightChainClient, LightChainNotify};
|
||||
use light::on_demand::OnDemand;
|
||||
use parity_runtime::Executor;
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
use sync::LightSync;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthFilter;
|
||||
|
||||
type Client = Sink<pubsub::Result>;
|
||||
|
||||
|
||||
@@ -30,15 +30,15 @@ use light::{cht, TransactionQueue};
|
||||
use light::on_demand::{request, OnDemand};
|
||||
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::encoded;
|
||||
use ethcore::filter::Filter as EthcoreFilter;
|
||||
use ethcore::ids::BlockId;
|
||||
use sync::LightSync;
|
||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
||||
use ethereum_types::U256;
|
||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
use rlp::Rlp;
|
||||
use transaction::SignedTransaction;
|
||||
use sync::LightSync;
|
||||
use types::transaction::SignedTransaction;
|
||||
use types::encoded;
|
||||
use types::filter::Filter as EthcoreFilter;
|
||||
use types::ids::BlockId;
|
||||
|
||||
use v1::impls::eth_filter::Filterable;
|
||||
use v1::helpers::{errors, limit_logs};
|
||||
|
||||
@@ -366,7 +366,7 @@ impl Parity for ParityClient {
|
||||
}
|
||||
|
||||
fn block_header(&self, number: Trailing<BlockNumber>) -> BoxFuture<RichHeader> {
|
||||
use ethcore::encoded;
|
||||
use types::encoded;
|
||||
|
||||
let engine = self.light_dispatch.client.engine().clone();
|
||||
let from_encoded = move |encoded: encoded::Header| {
|
||||
|
||||
@@ -23,20 +23,20 @@ use ethereum_types::Address;
|
||||
use version::version_data;
|
||||
|
||||
use crypto::DEFAULT_MAC;
|
||||
use ethkey::{crypto::ecies, Brain, Generator};
|
||||
use ethstore::random_phrase;
|
||||
use sync::{SyncProvider, ManageNetwork};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{BlockChainClient, StateClient, Call};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::miner::{self, MinerService};
|
||||
use ethcore::snapshot::{SnapshotService, RestorationStatus};
|
||||
use ethcore::state::StateInfo;
|
||||
use ethcore_logger::RotatingLogger;
|
||||
use updater::{Service as UpdateService};
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use ethkey::{crypto::ecies, Brain, Generator};
|
||||
use ethstore::random_phrase;
|
||||
use jsonrpc_core::futures::future;
|
||||
use jsonrpc_core::{BoxFuture, Result};
|
||||
use jsonrpc_macros::Trailing;
|
||||
use sync::{SyncProvider, ManageNetwork};
|
||||
use types::ids::BlockId;
|
||||
use updater::{Service as UpdateService};
|
||||
|
||||
use v1::helpers::block_import::is_major_importing;
|
||||
use v1::helpers::{self, errors, fake_sign, ipfs, SigningQueue, SignerService, NetworkSettings, verify_signature};
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::time::Duration;
|
||||
|
||||
use bytes::{Bytes, ToPretty};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use transaction::PendingTransaction;
|
||||
use types::transaction::PendingTransaction;
|
||||
use ethereum_types::{H520, U128, Address};
|
||||
use ethkey::{public_to_address, recover, Signature};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use rlp::Rlp;
|
||||
|
||||
use ethcore_private_tx::Provider as PrivateTransactionManager;
|
||||
use ethereum_types::Address;
|
||||
use transaction::SignedTransaction;
|
||||
use types::transaction::SignedTransaction;
|
||||
|
||||
use jsonrpc_core::{Error};
|
||||
use v1::types::{Bytes, PrivateTransactionReceipt, H160, H256, TransactionRequest, U256,
|
||||
|
||||
@@ -23,7 +23,7 @@ use ethkey;
|
||||
use parity_runtime::Executor;
|
||||
use parking_lot::Mutex;
|
||||
use rlp::Rlp;
|
||||
use transaction::{SignedTransaction, PendingTransaction};
|
||||
use types::transaction::{SignedTransaction, PendingTransaction};
|
||||
|
||||
use jsonrpc_core::{Result, BoxFuture, Error};
|
||||
use jsonrpc_core::futures::{future, Future, IntoFuture};
|
||||
|
||||
@@ -20,7 +20,7 @@ use std::sync::Arc;
|
||||
|
||||
use ethcore::client::{BlockChainClient, CallAnalytics, TransactionId, TraceId, StateClient, StateInfo, Call, BlockId};
|
||||
use rlp::Rlp;
|
||||
use transaction::SignedTransaction;
|
||||
use types::transaction::SignedTransaction;
|
||||
|
||||
use jsonrpc_core::Result;
|
||||
use jsonrpc_macros::Trailing;
|
||||
|
||||
@@ -18,22 +18,22 @@
|
||||
use std::env;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ethereum_types::{H256, Address};
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{BlockChainClient, Client, ClientConfig, ChainInfo, ImportBlock};
|
||||
use ethcore::ethereum;
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::miner::Miner;
|
||||
use ethcore::spec::{Genesis, Spec};
|
||||
use ethcore::test_helpers;
|
||||
use ethcore::verification::queue::kind::blocks::Unverified;
|
||||
use ethcore::verification::VerifierType;
|
||||
use ethcore::verification::queue::kind::blocks::Unverified;
|
||||
use ethereum_types::{H256, Address};
|
||||
use ethjson::blockchain::BlockChain;
|
||||
use ethjson::spec::ForkSpec;
|
||||
use io::IoChannel;
|
||||
use miner::external::ExternalMiner;
|
||||
use parking_lot::Mutex;
|
||||
use parity_runtime::Runtime;
|
||||
use parking_lot::Mutex;
|
||||
use types::ids::BlockId;
|
||||
|
||||
use jsonrpc_core::IoHandler;
|
||||
use v1::helpers::dispatch::FullDispatcher;
|
||||
|
||||
@@ -21,21 +21,23 @@ use std::collections::{BTreeMap, BTreeSet, HashMap};
|
||||
|
||||
use bytes::Bytes;
|
||||
use ethcore::account_provider::SignError as AccountError;
|
||||
use ethcore::block::{Block, SealedBlock, IsBlock};
|
||||
use ethcore::block::{SealedBlock, IsBlock};
|
||||
use ethcore::client::{Nonce, PrepareOpenBlock, StateClient, EngineInfo};
|
||||
use ethcore::engines::EthEngine;
|
||||
use ethcore::error::Error;
|
||||
use ethcore::header::{BlockNumber, Header};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::miner::{self, MinerService, AuthoringParams};
|
||||
use ethcore::receipt::RichReceipt;
|
||||
use ethereum_types::{H256, U256, Address};
|
||||
use ethkey::Password;
|
||||
use miner::pool::local_transactions::Status as LocalTransactionStatus;
|
||||
use miner::pool::{verifier, VerifiedTransaction, QueueStatus};
|
||||
use parking_lot::{RwLock, Mutex};
|
||||
use transaction::{self, UnverifiedTransaction, SignedTransaction, PendingTransaction};
|
||||
use types::transaction::{self, UnverifiedTransaction, SignedTransaction, PendingTransaction};
|
||||
use txpool;
|
||||
use ethkey::Password;
|
||||
use types::BlockNumber;
|
||||
use types::block::Block;
|
||||
use types::header::Header;
|
||||
use types::ids::BlockId;
|
||||
use types::receipt::RichReceipt;
|
||||
|
||||
/// Test miner service.
|
||||
pub struct TestMinerService {
|
||||
|
||||
@@ -19,20 +19,20 @@ use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Instant, Duration, SystemTime, UNIX_EPOCH};
|
||||
|
||||
use ethereum_types::{H160, H256, U256, Address};
|
||||
use parking_lot::Mutex;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{BlockChainClient, BlockId, EachBlockWith, Executed, TestBlockChainClient, TransactionId};
|
||||
use ethcore::log_entry::{LocalizedLogEntry, LogEntry};
|
||||
use ethcore::miner::MinerService;
|
||||
use ethcore::receipt::{LocalizedReceipt, TransactionOutcome};
|
||||
use ethereum_types::{H160, H256, U256, Address};
|
||||
use ethkey::Secret;
|
||||
use sync::SyncState;
|
||||
use miner::external::ExternalMiner;
|
||||
use parity_runtime::Runtime;
|
||||
use parking_lot::Mutex;
|
||||
use rlp;
|
||||
use rustc_hex::{FromHex, ToHex};
|
||||
use transaction::{Transaction, Action};
|
||||
use parity_runtime::Runtime;
|
||||
use sync::SyncState;
|
||||
use types::transaction::{Transaction, Action};
|
||||
use types::log_entry::{LocalizedLogEntry, LogEntry};
|
||||
use types::receipt::{LocalizedReceipt, TransactionOutcome};
|
||||
|
||||
use jsonrpc_core::IoHandler;
|
||||
use v1::{Eth, EthClient, EthClientOptions, EthFilter, EthFilterClient, EthSigning, SigningUnsafeClient};
|
||||
@@ -584,7 +584,7 @@ fn rpc_eth_transaction_count_by_number_pending() {
|
||||
fn rpc_eth_pending_transaction_by_hash() {
|
||||
use ethereum_types::H256;
|
||||
use rlp;
|
||||
use transaction::SignedTransaction;
|
||||
use types::transaction::SignedTransaction;
|
||||
|
||||
let tester = EthTester::default();
|
||||
{
|
||||
|
||||
@@ -84,9 +84,9 @@ fn should_subscribe_to_new_heads() {
|
||||
|
||||
#[test]
|
||||
fn should_subscribe_to_logs() {
|
||||
use ethcore::log_entry::{LocalizedLogEntry, LogEntry};
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::client::BlockInfo;
|
||||
use types::log_entry::{LocalizedLogEntry, LogEntry};
|
||||
use types::ids::BlockId;
|
||||
|
||||
// given
|
||||
let el = Runtime::with_thread_count(1);
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
use std::sync::Arc;
|
||||
use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::{TestBlockChainClient, Executed, TransactionId};
|
||||
use ethcore::receipt::{LocalizedReceipt, TransactionOutcome};
|
||||
use ethcore_logger::RotatingLogger;
|
||||
use ethereum_types::{Address, U256, H256};
|
||||
use ethstore::ethkey::{Generator, Random};
|
||||
use miner::pool::local_transactions::Status as LocalTransactionStatus;
|
||||
use sync::ManageNetwork;
|
||||
use types::receipt::{LocalizedReceipt, TransactionOutcome};
|
||||
|
||||
use jsonrpc_core::IoHandler;
|
||||
use v1::{Parity, ParityClient};
|
||||
@@ -433,11 +433,11 @@ fn rpc_parity_transactions_stats() {
|
||||
fn rpc_parity_local_transactions() {
|
||||
let deps = Dependencies::new();
|
||||
let io = deps.default_client();
|
||||
let tx = ::transaction::Transaction {
|
||||
let tx = ::types::transaction::Transaction {
|
||||
value: 5.into(),
|
||||
gas: 3.into(),
|
||||
gas_price: 2.into(),
|
||||
action: ::transaction::Action::Create,
|
||||
action: ::types::transaction::Action::Create,
|
||||
data: vec![1, 2, 3],
|
||||
nonce: 0.into(),
|
||||
}.fake_sign(3.into());
|
||||
|
||||
@@ -210,7 +210,7 @@ fn rpc_parity_set_hash_content() {
|
||||
|
||||
#[test]
|
||||
fn rpc_parity_remove_transaction() {
|
||||
use transaction::{Transaction, Action};
|
||||
use types::transaction::{Transaction, Action};
|
||||
|
||||
let miner = miner_service();
|
||||
let client = client_service();
|
||||
|
||||
@@ -23,7 +23,7 @@ use ethcore::account_provider::AccountProvider;
|
||||
use ethcore::client::TestBlockChainClient;
|
||||
use jsonrpc_core::IoHandler;
|
||||
use parking_lot::Mutex;
|
||||
use transaction::{Action, Transaction};
|
||||
use types::transaction::{Action, Transaction};
|
||||
use parity_runtime::Runtime;
|
||||
use hash::keccak;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ use ethcore::client::TestBlockChainClient;
|
||||
use parity_runtime::Runtime;
|
||||
use parking_lot::Mutex;
|
||||
use rlp::encode;
|
||||
use transaction::{Transaction, Action, SignedTransaction};
|
||||
use types::transaction::{Transaction, Action, SignedTransaction};
|
||||
|
||||
use serde_json;
|
||||
use jsonrpc_core::IoHandler;
|
||||
|
||||
@@ -38,7 +38,7 @@ use ethkey::Secret;
|
||||
use ethstore::ethkey::{Generator, Random};
|
||||
use parking_lot::Mutex;
|
||||
use serde_json;
|
||||
use transaction::{Transaction, Action, SignedTransaction};
|
||||
use types::transaction::{Transaction, Action, SignedTransaction};
|
||||
use parity_runtime::{Runtime, Executor};
|
||||
|
||||
struct SigningTester {
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
use std::ops::Deref;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ethcore::encoded::Header as EthHeader;
|
||||
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde::ser::Error;
|
||||
use serde::{Serialize, Serializer};
|
||||
use types::encoded::Header as EthHeader;
|
||||
|
||||
use v1::types::{Bytes, Transaction, H160, H256, H2048, U256};
|
||||
|
||||
/// Block Transactions
|
||||
|
||||
@@ -14,12 +14,13 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use serde::de::{Error, DeserializeOwned};
|
||||
use serde_json::{Value, from_value};
|
||||
use jsonrpc_core::{Error as RpcError};
|
||||
use ethcore::filter::Filter as EthFilter;
|
||||
use ethcore::client::BlockId;
|
||||
use serde::de::{Error, DeserializeOwned};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
use serde_json::{Value, from_value};
|
||||
use types::filter::Filter as EthFilter;
|
||||
use types::ids::BlockId;
|
||||
|
||||
use v1::types::{BlockNumber, H160, H256, Log};
|
||||
use v1::helpers::errors::invalid_params;
|
||||
|
||||
@@ -149,8 +150,8 @@ mod tests {
|
||||
use ethereum_types::H256;
|
||||
use super::{VariadicValue, Topic, Filter};
|
||||
use v1::types::BlockNumber;
|
||||
use ethcore::filter::Filter as EthFilter;
|
||||
use ethcore::client::BlockId;
|
||||
use types::filter::Filter as EthFilter;
|
||||
use types::ids::BlockId;
|
||||
|
||||
#[test]
|
||||
fn topic_deserialization() {
|
||||
|
||||
@@ -14,7 +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 ethcore::log_entry::{LocalizedLogEntry, LogEntry};
|
||||
use types::log_entry::{LocalizedLogEntry, LogEntry};
|
||||
use v1::types::{Bytes, H160, H256, U256};
|
||||
|
||||
/// Log
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use v1::types::{Log, H160, H256, H2048, U256, U64};
|
||||
use ethcore::receipt::{Receipt as EthReceipt, RichReceipt, LocalizedReceipt, TransactionOutcome};
|
||||
use types::receipt::{Receipt as EthReceipt, RichReceipt, LocalizedReceipt, TransactionOutcome};
|
||||
|
||||
/// Receipt
|
||||
#[derive(Debug, Serialize)]
|
||||
|
||||
@@ -15,15 +15,17 @@
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde::ser::SerializeStruct;
|
||||
use ethcore::trace::{FlatTrace, LocalizedTrace as EthLocalizedTrace, trace, TraceError};
|
||||
use ethcore::trace as et;
|
||||
use ethcore::state_diff;
|
||||
use ethcore::account_diff;
|
||||
|
||||
use ethcore::client::Executed;
|
||||
use ethcore::trace as et;
|
||||
use ethcore::trace::{FlatTrace, LocalizedTrace as EthLocalizedTrace, trace, TraceError};
|
||||
use ethereum_types::H256 as EthH256;
|
||||
use serde::ser::SerializeStruct;
|
||||
use serde::{Serialize, Serializer};
|
||||
use types::account_diff;
|
||||
use types::state_diff;
|
||||
use vm;
|
||||
|
||||
use v1::types::{Bytes, H160, H256, U256};
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
||||
@@ -20,7 +20,7 @@ use serde::{Serialize, Serializer};
|
||||
use serde::ser::SerializeStruct;
|
||||
use ethcore::{contract_address, CreateContractAddress};
|
||||
use miner;
|
||||
use transaction::{LocalizedTransaction, Action, PendingTransaction, SignedTransaction};
|
||||
use types::transaction::{LocalizedTransaction, Action, PendingTransaction, SignedTransaction};
|
||||
use v1::types::{Bytes, H160, H256, U256, H512, U64, TransactionCondition};
|
||||
|
||||
/// Transaction
|
||||
|
||||
@@ -14,7 +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 transaction;
|
||||
use types::transaction;
|
||||
|
||||
/// Represents condition on minimum block number or block timestamp.
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user