From 2a7ed457dc0ee335eae66403e1a95131a5ce690a Mon Sep 17 00:00:00 2001 From: Hernando Castano Date: Thu, 17 Jan 2019 16:43:08 +0100 Subject: [PATCH] Remove CallContract and RegistryInfo re-exports from `ethcore/client` (#10205) * Remove re-export of `CallContract` and `RegistryInfo` from `ethcore/client` * Remove CallContract and RegistryInfo re-exports again This was missed while fixing merge conflicts --- Cargo.lock | 3 +++ Cargo.toml | 1 + ethcore/private-tx/Cargo.toml | 1 + ethcore/private-tx/src/lib.rs | 4 +++- ethcore/src/client/mod.rs | 3 --- ethcore/src/engines/validator_set/contract.rs | 3 ++- ethcore/src/lib.rs | 2 +- ethcore/src/machine.rs | 3 ++- ethcore/src/miner/miner.rs | 3 ++- ethcore/src/miner/mod.rs | 3 ++- ethcore/src/miner/pool_client.rs | 3 ++- ethcore/src/tx_filter.rs | 3 ++- ethcore/src/verification/canon_verifier.rs | 3 ++- ethcore/src/verification/mod.rs | 3 ++- ethcore/src/verification/noop_verifier.rs | 3 ++- ethcore/src/verification/verification.rs | 3 ++- ethcore/src/verification/verifier.rs | 3 ++- parity/lib.rs | 3 ++- parity/run.rs | 3 ++- secret-store/Cargo.toml | 1 + secret-store/src/acl_storage.rs | 3 ++- secret-store/src/key_server_set.rs | 3 ++- secret-store/src/lib.rs | 1 + secret-store/src/listener/service_contract.rs | 3 ++- secret-store/src/trusted_client.rs | 3 ++- 25 files changed, 45 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 240ceaf2b..d4f3f4521 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -976,6 +976,7 @@ dependencies = [ "ethabi-contract 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 6.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.12.0", + "ethcore-call-contract 0.1.0", "ethcore-io 1.12.0", "ethcore-miner 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1014,6 +1015,7 @@ dependencies = [ "ethabi-contract 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethabi-derive 6.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.12.0", + "ethcore-call-contract 0.1.0", "ethcore-sync 1.12.0", "ethereum-types 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", @@ -2408,6 +2410,7 @@ dependencies = [ "docopt 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.12.0", "ethcore-blockchain 0.1.0", + "ethcore-call-contract 0.1.0", "ethcore-db 0.1.0", "ethcore-io 1.12.0", "ethcore-light 1.12.0", diff --git a/Cargo.toml b/Cargo.toml index 5e9560035..c5c73dc52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ ethcore = { path = "ethcore", features = ["parity"] } parity-bytes = "0.1" common-types = { path = "ethcore/types" } ethcore-blockchain = { path = "ethcore/blockchain" } +ethcore-call-contract = { path = "ethcore/call-contract"} ethcore-db = { path = "ethcore/db" } ethcore-io = { path = "util/io" } ethcore-light = { path = "ethcore/light" } diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 1dd328e11..5151deee4 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -12,6 +12,7 @@ ethabi = "6.0" ethabi-contract = "6.0" ethabi-derive = "6.0" ethcore = { path = ".." } +ethcore-call-contract = { path = "../call-contract" } ethcore-io = { path = "../../util/io" } ethcore-miner = { path = "../../miner" } ethereum-types = "0.4" diff --git a/ethcore/private-tx/src/lib.rs b/ethcore/private-tx/src/lib.rs index f55a30334..3ab39d9e4 100644 --- a/ethcore/private-tx/src/lib.rs +++ b/ethcore/private-tx/src/lib.rs @@ -28,6 +28,7 @@ mod error; extern crate common_types as types; extern crate ethabi; extern crate ethcore; +extern crate ethcore_call_contract as call_contract; extern crate ethcore_io as io; extern crate ethcore_miner; extern crate ethereum_types; @@ -82,11 +83,12 @@ use types::transaction::{SignedTransaction, Transaction, Action, UnverifiedTrans use ethcore::{contract_address as ethcore_contract_address}; use ethcore::client::{ Client, ChainNotify, NewBlocks, ChainMessageType, ClientIoMessage, BlockId, - CallContract, Call, BlockInfo + Call, BlockInfo }; use ethcore::account_provider::AccountProvider; use ethcore::miner::{self, Miner, MinerService, pool_client::NonceCache}; use ethcore::trace::{Tracer, VMTracer}; +use call_contract::CallContract; use rustc_hex::FromHex; use ethkey::Password; use ethabi::FunctionOutputDecoder; diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index ccd0d6355..d501ba21f 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -48,9 +48,6 @@ pub use types::trace_filter::Filter as TraceFilter; pub use types::pruning_info::PruningInfo; pub use types::call_analytics::CallAnalytics; -// TODO: Get rid of re-exports: https://github.com/paritytech/parity-ethereum/issues/10130 -pub use call_contract::{CallContract, RegistryInfo}; - pub use executive::{Executed, Executive, TransactOptions}; pub use vm::{LastHashes, EnvInfo}; diff --git a/ethcore/src/engines/validator_set/contract.rs b/ethcore/src/engines/validator_set/contract.rs index 714a092d7..b13ebdd10 100644 --- a/ethcore/src/engines/validator_set/contract.rs +++ b/ethcore/src/engines/validator_set/contract.rs @@ -145,7 +145,8 @@ mod tests { use miner::MinerService; use types::ids::BlockId; use test_helpers::generate_dummy_client_with_spec_and_accounts; - use client::{BlockChainClient, ChainInfo, BlockInfo, CallContract}; + use call_contract::CallContract; + use client::{BlockChainClient, ChainInfo, BlockInfo}; use super::super::ValidatorSet; use super::ValidatorContract; diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index 8d7a52e40..3da2eb952 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -60,13 +60,13 @@ extern crate ansi_term; extern crate bn; extern crate byteorder; -extern crate ethcore_call_contract as call_contract; extern crate common_types as types; extern crate crossbeam; extern crate ethabi; extern crate ethash; extern crate ethcore_blockchain as blockchain; extern crate ethcore_bloom_journal as bloom_journal; +extern crate ethcore_call_contract as call_contract; extern crate ethcore_db as db; extern crate ethcore_io as io; extern crate ethcore_miner; diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 873262d5d..a14cb3bd2 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -30,7 +30,8 @@ use vm::{EnvInfo, Schedule, CreateContractAddress}; use block::{ExecutedBlock, IsBlock}; use builtin::Builtin; -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use error::Error; use executive::Executive; use spec::CommonParams; diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index d30c5a67d..998ce6280 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -21,6 +21,7 @@ use std::sync::Arc; use ansi_term::Colour; use bytes::Bytes; +use call_contract::CallContract; use ethcore_miner::gas_pricer::GasPricer; use ethcore_miner::pool::{self, TransactionQueue, VerifiedTransaction, QueueStatus, PrioritizationStrategy}; #[cfg(feature = "work-notify")] @@ -48,7 +49,7 @@ use using_queue::{UsingQueue, GetAction}; use account_provider::{AccountProvider, SignError as AccountError}; use block::{ClosedBlock, IsBlock, SealedBlock}; use client::{ - BlockChain, ChainInfo, CallContract, BlockProducer, SealedBlockImporter, Nonce, TransactionInfo, TransactionId + BlockChain, ChainInfo, BlockProducer, SealedBlockImporter, Nonce, TransactionInfo, TransactionId }; use client::{BlockId, ClientIoMessage}; use engines::{EthEngine, Seal}; diff --git a/ethcore/src/miner/mod.rs b/ethcore/src/miner/mod.rs index 399d66b54..4f5ba4c1f 100644 --- a/ethcore/src/miner/mod.rs +++ b/ethcore/src/miner/mod.rs @@ -42,8 +42,9 @@ use types::header::Header; use types::receipt::RichReceipt; use block::SealedBlock; +use call_contract::{CallContract, RegistryInfo}; use client::{ - CallContract, RegistryInfo, ScheduleInfo, + ScheduleInfo, BlockChain, BlockProducer, SealedBlockImporter, ChainInfo, AccountData, Nonce, }; diff --git a/ethcore/src/miner/pool_client.rs b/ethcore/src/miner/pool_client.rs index 1bccc04f1..a75454a3f 100644 --- a/ethcore/src/miner/pool_client.rs +++ b/ethcore/src/miner/pool_client.rs @@ -35,7 +35,8 @@ use types::header::Header; use parking_lot::RwLock; use account_provider::AccountProvider; -use client::{TransactionId, BlockInfo, CallContract, Nonce}; +use call_contract::CallContract; +use client::{TransactionId, BlockInfo, Nonce}; use engines::EthEngine; use miner; use transaction_ext::Transaction; diff --git a/ethcore/src/tx_filter.rs b/ethcore/src/tx_filter.rs index 403e4f7bc..3f32ab365 100644 --- a/ethcore/src/tx_filter.rs +++ b/ethcore/src/tx_filter.rs @@ -20,7 +20,8 @@ use ethereum_types::{H256, U256, Address}; use lru_cache::LruCache; use ethabi::FunctionOutputDecoder; -use client::{BlockInfo, CallContract, BlockId}; +use call_contract::CallContract; +use client::{BlockInfo, BlockId}; use parking_lot::Mutex; use spec::CommonParams; use types::transaction::{Action, SignedTransaction}; diff --git a/ethcore/src/verification/canon_verifier.rs b/ethcore/src/verification/canon_verifier.rs index 4a8ed111c..03a1c7155 100644 --- a/ethcore/src/verification/canon_verifier.rs +++ b/ethcore/src/verification/canon_verifier.rs @@ -16,7 +16,8 @@ //! Canonical verifier. -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::Error; use types::header::Header; diff --git a/ethcore/src/verification/mod.rs b/ethcore/src/verification/mod.rs index acffb8c0a..5546bd60c 100644 --- a/ethcore/src/verification/mod.rs +++ b/ethcore/src/verification/mod.rs @@ -28,7 +28,8 @@ pub use self::canon_verifier::CanonVerifier; pub use self::noop_verifier::NoopVerifier; pub use self::queue::{BlockQueue, Config as QueueConfig, VerificationQueue, QueueInfo}; -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; /// Verifier type. #[derive(Debug, PartialEq, Clone)] diff --git a/ethcore/src/verification/noop_verifier.rs b/ethcore/src/verification/noop_verifier.rs index 727e99a66..d68f1eb88 100644 --- a/ethcore/src/verification/noop_verifier.rs +++ b/ethcore/src/verification/noop_verifier.rs @@ -16,7 +16,8 @@ //! No-op verifier. -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::Error; use types::header::Header; diff --git a/ethcore/src/verification/verification.rs b/ethcore/src/verification/verification.rs index 31eb9dfa6..827b71439 100644 --- a/ethcore/src/verification/verification.rs +++ b/ethcore/src/verification/verification.rs @@ -32,7 +32,8 @@ use triehash::ordered_trie_root; use unexpected::{Mismatch, OutOfBounds}; use blockchain::*; -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::{BlockError, Error}; use types::{BlockNumber, header::Header}; diff --git a/ethcore/src/verification/verifier.rs b/ethcore/src/verification/verifier.rs index a1a5d32bc..76eb60b9a 100644 --- a/ethcore/src/verification/verifier.rs +++ b/ethcore/src/verification/verifier.rs @@ -16,7 +16,8 @@ //! A generic verifier trait. -use client::{BlockInfo, CallContract}; +use call_contract::CallContract; +use client::BlockInfo; use engines::EthEngine; use error::Error; use types::header::Header; diff --git a/parity/lib.rs b/parity/lib.rs index 14ec8f98e..b96995910 100644 --- a/parity/lib.rs +++ b/parity/lib.rs @@ -43,8 +43,9 @@ extern crate toml; extern crate blooms_db; extern crate cli_signer; extern crate common_types as types; -extern crate ethcore; extern crate parity_bytes as bytes; +extern crate ethcore; +extern crate ethcore_call_contract as call_contract; extern crate ethcore_db; extern crate ethcore_io as io; extern crate ethcore_light as light; diff --git a/parity/run.rs b/parity/run.rs index 6c53e675c..03dbe447f 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -21,8 +21,9 @@ use std::thread; use ansi_term::Colour; use bytes::Bytes; +use call_contract::CallContract; use ethcore::account_provider::{AccountProvider, AccountProviderSettings}; -use ethcore::client::{BlockId, CallContract, Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; +use ethcore::client::{BlockId, Client, Mode, DatabaseCompactionProfile, VMType, BlockChainClient, BlockInfo}; use ethstore::ethkey; use ethcore::miner::{stratum, Miner, MinerService, MinerOptions}; use ethcore::snapshot::{self, SnapshotConfiguration}; diff --git a/secret-store/Cargo.toml b/secret-store/Cargo.toml index 8d41d48a8..016028a0b 100644 --- a/secret-store/Cargo.toml +++ b/secret-store/Cargo.toml @@ -8,6 +8,7 @@ authors = ["Parity Technologies "] [dependencies] byteorder = "1.0" common-types = { path = "../ethcore/types" } +ethcore-call-contract = { path = "../ethcore/call-contract" } log = "0.4" parking_lot = "0.7" hyper = { version = "0.12", default-features = false } diff --git a/secret-store/src/acl_storage.rs b/secret-store/src/acl_storage.rs index 98eab5d93..8c6656b10 100644 --- a/secret-store/src/acl_storage.rs +++ b/secret-store/src/acl_storage.rs @@ -17,7 +17,8 @@ use std::sync::Arc; use std::collections::{HashMap, HashSet}; use parking_lot::{Mutex, RwLock}; -use ethcore::client::{BlockId, ChainNotify, NewBlocks, CallContract}; +use call_contract::CallContract; +use ethcore::client::{BlockId, ChainNotify, NewBlocks}; use ethereum_types::Address; use ethabi::FunctionOutputDecoder; use trusted_client::TrustedClient; diff --git a/secret-store/src/key_server_set.rs b/secret-store/src/key_server_set.rs index 50036d04d..5b25641ae 100644 --- a/secret-store/src/key_server_set.rs +++ b/secret-store/src/key_server_set.rs @@ -18,8 +18,9 @@ use std::sync::Arc; use std::net::SocketAddr; use std::collections::{BTreeMap, HashSet}; use parking_lot::Mutex; +use call_contract::CallContract; use ethabi::FunctionOutputDecoder; -use ethcore::client::{Client, BlockChainClient, BlockId, ChainNotify, NewBlocks, CallContract}; +use ethcore::client::{Client, BlockChainClient, BlockId, ChainNotify, NewBlocks}; use ethereum_types::{H256, Address}; use ethkey::public_to_address; use bytes::Bytes; diff --git a/secret-store/src/lib.rs b/secret-store/src/lib.rs index 76ae09ffb..915cec528 100644 --- a/secret-store/src/lib.rs +++ b/secret-store/src/lib.rs @@ -18,6 +18,7 @@ extern crate byteorder; extern crate common_types; extern crate ethabi; extern crate ethcore; +extern crate ethcore_call_contract as call_contract; extern crate ethcore_sync as sync; extern crate ethereum_types; extern crate ethkey; diff --git a/secret-store/src/listener/service_contract.rs b/secret-store/src/listener/service_contract.rs index 47bb996e3..795e75d2c 100644 --- a/secret-store/src/listener/service_contract.rs +++ b/secret-store/src/listener/service_contract.rs @@ -19,7 +19,8 @@ use parking_lot::RwLock; use common_types::filter::Filter; use ethabi::RawLog; use ethabi::FunctionOutputDecoder; -use ethcore::client::{Client, BlockChainClient, BlockId, CallContract}; +use call_contract::CallContract; +use ethcore::client::{Client, BlockChainClient, BlockId}; use ethkey::{Public, public_to_address}; use hash::keccak; use bytes::Bytes; diff --git a/secret-store/src/trusted_client.rs b/secret-store/src/trusted_client.rs index d66e7f43d..a20373ad0 100644 --- a/secret-store/src/trusted_client.rs +++ b/secret-store/src/trusted_client.rs @@ -16,9 +16,10 @@ use std::sync::{Arc, Weak}; use bytes::Bytes; +use call_contract::RegistryInfo; use common_types::transaction::{Transaction, SignedTransaction, Action}; use ethereum_types::Address; -use ethcore::client::{Client, BlockChainClient, ChainInfo, Nonce, BlockId, RegistryInfo}; +use ethcore::client::{Client, BlockChainClient, ChainInfo, Nonce, BlockId}; use ethcore::miner::{Miner, MinerService}; use sync::SyncProvider; use helpers::{get_confirmed_block_hash, REQUEST_CONFIRMATIONS_REQUIRED};