Don't reexport bigint from util
This commit is contained in:
@@ -14,6 +14,7 @@ build = "build.rs"
|
||||
log = "0.3"
|
||||
ethcore = { path = ".."}
|
||||
ethcore-util = { path = "../../util" }
|
||||
ethcore-bigint = { path = "../../util/bigint" }
|
||||
ethcore-network = { path = "../../util/network" }
|
||||
ethcore-io = { path = "../../util/io" }
|
||||
ethcore-ipc = { path = "../../ipc/rpc", optional = true }
|
||||
|
||||
@@ -27,7 +27,8 @@ use ethcore::receipt::Receipt;
|
||||
use stats::Corpus;
|
||||
use time::{SteadyTime, Duration};
|
||||
use heapsize::HeapSizeOf;
|
||||
use util::{U256, H256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::cache::MemoryLruCache;
|
||||
|
||||
/// Configuration for how much data to cache.
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
//! we discarded.
|
||||
|
||||
use ethcore::ids::BlockId;
|
||||
use util::{Bytes, H256, U256, HashDB, MemoryDB};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, HashDB, MemoryDB};
|
||||
use util::trie::{self, TrieMut, TrieDBMut, Trie, TrieDB, Recorder};
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
|
||||
|
||||
@@ -37,7 +37,9 @@ use ethcore::ids::BlockId;
|
||||
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
|
||||
use heapsize::HeapSizeOf;
|
||||
use util::{H256, U256, RwLock};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::RwLock;
|
||||
use util::kvdb::{DBTransaction, KeyValueDB};
|
||||
|
||||
use cache::Cache;
|
||||
|
||||
@@ -31,7 +31,9 @@ use ethcore::service::ClientIoMessage;
|
||||
use ethcore::encoded;
|
||||
use io::IoChannel;
|
||||
|
||||
use util::{H256, U256, Mutex, RwLock};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Mutex, RwLock};
|
||||
use util::kvdb::{KeyValueDB, CompactionProfile};
|
||||
|
||||
use self::header_chain::{AncestryIter, HeaderChain};
|
||||
|
||||
@@ -70,6 +70,7 @@ extern crate bincode;
|
||||
extern crate ethcore_io as io;
|
||||
extern crate ethcore_network as network;
|
||||
extern crate ethcore_util as util;
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore;
|
||||
extern crate evm;
|
||||
extern crate heapsize;
|
||||
|
||||
@@ -23,8 +23,9 @@ use ethcore::transaction::UnverifiedTransaction;
|
||||
use io::TimerToken;
|
||||
use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
use util::hash::H256;
|
||||
use util::{DBValue, Mutex, RwLock, U256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{DBValue, Mutex, RwLock};
|
||||
use time::{Duration, SteadyTime};
|
||||
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
@@ -30,7 +30,7 @@ use request::{self, Request};
|
||||
use super::error::Error;
|
||||
|
||||
use rlp::*;
|
||||
use util::U256;
|
||||
use bigint::prelude::U256;
|
||||
use time::{Duration, SteadyTime};
|
||||
|
||||
/// Credits value.
|
||||
|
||||
@@ -27,7 +27,7 @@ use std::iter::FromIterator;
|
||||
use request::Request;
|
||||
use request::NetworkRequests as Requests;
|
||||
use net::{timeout, ReqId};
|
||||
use util::U256;
|
||||
use bigint::prelude::U256;
|
||||
|
||||
use time::{Duration, SteadyTime};
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
//! Peer status and capabilities.
|
||||
|
||||
use rlp::{DecoderError, Encodable, Decodable, RlpStream, UntrustedRlp};
|
||||
use util::{H256, U256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
|
||||
use super::request_credits::FlowParams;
|
||||
|
||||
@@ -373,7 +374,8 @@ pub fn write_announcement(announcement: &Announcement) -> Vec<u8> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::super::request_credits::FlowParams;
|
||||
use util::{U256, H256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -32,7 +32,9 @@ use request;
|
||||
use request::*;
|
||||
|
||||
use rlp::*;
|
||||
use util::{Address, H256, U256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Address;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@ use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY, KECCAK_EMPTY_LIST_RLP, keccak};
|
||||
use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, OutputKind, Field};
|
||||
|
||||
use rlp::{RlpStream, UntrustedRlp};
|
||||
use util::{Address, Bytes, DBValue, HashDB, Mutex, H256, U256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Address, Bytes, DBValue, HashDB, Mutex};
|
||||
use util::memorydb::MemoryDB;
|
||||
use util::trie::{Trie, TrieDB, TrieError};
|
||||
|
||||
@@ -850,7 +852,8 @@ impl TransactionProof {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use util::{MemoryDB, Address, Mutex, H256};
|
||||
use bigint::hash::H256;
|
||||
use util::{MemoryDB, Address, Mutex};
|
||||
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
||||
use util::trie::recorder::Recorder;
|
||||
use hash::keccak;
|
||||
|
||||
@@ -22,7 +22,8 @@ use ethcore::header::{Header, Seal};
|
||||
use futures::Future;
|
||||
use network::{PeerId, NodeId};
|
||||
use net::*;
|
||||
use util::{H256, Mutex};
|
||||
use bigint::hash::H256;
|
||||
use util::Mutex;
|
||||
use time::Duration;
|
||||
use ::request::{self as basic_request, Response};
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ use ethcore::client::{BlockChainClient, ProvingBlockChainClient};
|
||||
use ethcore::transaction::PendingTransaction;
|
||||
use ethcore::ids::BlockId;
|
||||
use ethcore::encoded;
|
||||
use util::{RwLock, H256};
|
||||
use bigint::hash::H256;
|
||||
use util::RwLock;
|
||||
|
||||
use cht::{self, BlockInfo};
|
||||
use client::{LightChainClient, AsLightClient};
|
||||
|
||||
@@ -28,7 +28,9 @@ use std::collections::hash_map::Entry;
|
||||
|
||||
use ethcore::error::{TransactionError, TransactionImportResult};
|
||||
use ethcore::transaction::{Condition, PendingTransaction, SignedTransaction};
|
||||
use util::{Address, U256, H256, H256FastMap};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::{H256, H256FastMap};
|
||||
use util::Address;
|
||||
|
||||
// Knowledge of an account's current nonce.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
||||
@@ -211,7 +211,7 @@ impl<T: IncompleteRequest> DerefMut for Requests<T> {
|
||||
mod tests {
|
||||
use request::*;
|
||||
use super::RequestBuilder;
|
||||
use util::H256;
|
||||
use bigint::hash::H256;
|
||||
|
||||
#[test]
|
||||
fn all_scalar() {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Light protocol request types.
|
||||
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use util::H256;
|
||||
use bigint::hash::H256;
|
||||
|
||||
mod builder;
|
||||
|
||||
@@ -760,7 +760,9 @@ pub mod header {
|
||||
pub mod header_proof {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use util::{Bytes, U256, H256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
|
||||
/// Potentially incomplete header proof request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -854,7 +856,7 @@ pub mod header_proof {
|
||||
/// Request and response for transaction index.
|
||||
pub mod transaction_index {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use util::H256;
|
||||
use bigint::hash::H256;
|
||||
|
||||
/// Potentially incomplete transaction index request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -932,7 +934,7 @@ pub mod transaction_index {
|
||||
pub mod block_receipts {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use ethcore::receipt::Receipt;
|
||||
use util::H256;
|
||||
use bigint::hash::H256;
|
||||
|
||||
/// Potentially incomplete block receipts request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -1001,7 +1003,7 @@ pub mod block_body {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use ethcore::encoded;
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use util::H256;
|
||||
use bigint::hash::H256;
|
||||
|
||||
/// Potentially incomplete block body request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -1089,7 +1091,9 @@ pub mod block_body {
|
||||
/// A request for an account proof.
|
||||
pub mod account {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use util::{Bytes, U256, H256};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
|
||||
/// Potentially incomplete request for an account proof.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -1188,7 +1192,8 @@ pub mod account {
|
||||
/// A request for a storage proof.
|
||||
pub mod storage {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use util::{Bytes, H256};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
|
||||
/// Potentially incomplete request for an storage proof.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -1296,7 +1301,8 @@ pub mod storage {
|
||||
/// A request for contract code.
|
||||
pub mod contract_code {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use util::{Bytes, H256};
|
||||
use bigint::hash::H256;
|
||||
use util::Bytes;
|
||||
|
||||
/// Potentially incomplete contract code request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -1382,7 +1388,9 @@ pub mod execution {
|
||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||
use ethcore::transaction::Action;
|
||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||
use util::{Bytes, Address, U256, H256, DBValue};
|
||||
use bigint::prelude::U256;
|
||||
use bigint::hash::H256;
|
||||
use util::{Bytes, Address, DBValue};
|
||||
|
||||
/// Potentially incomplete execution proof request.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||
@@ -1591,7 +1599,7 @@ mod tests {
|
||||
let full_req = Request::TransactionIndex(req.clone());
|
||||
let res = TransactionIndexResponse {
|
||||
num: 1000,
|
||||
hash: ::util::H256::random(),
|
||||
hash: ::bigint::hash::H256::random(),
|
||||
index: 4,
|
||||
};
|
||||
let full_res = Response::TransactionIndex(res.clone());
|
||||
|
||||
Reference in New Issue
Block a user