Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Refactor: Don't reexport bigint from util #6459

Merged
merged 6 commits into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "pa
ethsync = { path = "sync" }
ethcore = { path = "ethcore" }
ethcore-util = { path = "util" }
ethcore-bigint = { path = "util/bigint" }
ethcore-io = { path = "util/io" }
ethcore-devtools = { path = "devtools" }
ethcore-ipc = { path = "ipc/rpc" }
Expand Down
1 change: 1 addition & 0 deletions dapps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "pa
jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.7" }

ethcore-util = { path = "../util" }
ethcore-bigint = { path = "../util/bigint" }
fetch = { path = "../util/fetch" }
node-health = { path = "./node-health" }
parity-hash-fetch = { path = "../hash-fetch" }
Expand Down
2 changes: 1 addition & 1 deletion dapps/src/apps/fetcher/installers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::io::{self, Read, Write};
use std::path::PathBuf;
use fetch::{self, Mime};
use hash::keccak_buffer;
use util::H256;
use bigint::hash::H256;

use page::{LocalPageEndpoint, PageCache};
use handlers::{ContentValidator, ValidatorResponse};
Expand Down
1 change: 1 addition & 0 deletions dapps/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extern crate jsonrpc_core;
extern crate jsonrpc_http_server;

extern crate ethcore_util as util;
extern crate ethcore_bigint as bigint;
extern crate fetch;
extern crate node_health;
extern crate parity_dapps_glue as parity_dapps;
Expand Down
3 changes: 2 additions & 1 deletion dapps/src/tests/helpers/registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ use std::collections::HashMap;
use rustc_hex::FromHex;

use hash_fetch::urlhint::ContractClient;
use bigint::hash::H256;
use util::{Bytes, Address, ToPretty};
use parking_lot::Mutex;
use util::{Bytes, Address, H256, ToPretty};

const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
Expand Down
1 change: 1 addition & 0 deletions ethcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ethcore-ipc-nano = { path = "../ipc/nano" }
ethcore-logger = { path = "../logger" }
ethcore-stratum = { path = "../stratum" }
ethcore-util = { path = "../util" }
ethcore-bigint = { path = "../util/bigint" }
ethjson = { path = "../json" }
ethkey = { path = "../ethkey" }
ethstore = { path = "../ethstore" }
Expand Down
1 change: 1 addition & 0 deletions ethcore/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ bit-set = "0.4"
byteorder = "1.0"
common-types = { path = "../types" }
ethcore-util = { path = "../../util" }
ethcore-bigint = { path = "../../util/bigint" }
evmjit = { path = "../../evmjit", optional = true }
ethjson = { path = "../../json" }
heapsize = "0.4"
Expand Down
2 changes: 2 additions & 0 deletions ethcore/evm/src/benches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ extern crate test;

use self::test::{Bencher, black_box};

use bigint::prelude::U256;
use bigint::hash::H256;
use util::*;
use vm::ActionParams;
use evm::{self, Factory, VMType};
Expand Down
5 changes: 3 additions & 2 deletions ethcore/evm/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
//! Evm interface.

use std::{ops, cmp, fmt};
use util::{U128, U256, U512};

use bigint::prelude::{U128, U256, U512};
use vm::{Ext, Result, ReturnData, GasLeft, Error};

/// Finalization result. Gas Left: either it is a known value, or it needs to be computed by processing
Expand Down Expand Up @@ -149,7 +150,7 @@ impl CostType for usize {

#[cfg(test)]
mod tests {
use util::U256;
use bigint::prelude::U256;
use super::CostType;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion ethcore/evm/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//!
use std::sync::Arc;
use vm::Vm;
use util::U256;
use bigint::prelude::U256;
use super::interpreter::SharedCache;
use super::vmtype::VMType;

Expand Down
3 changes: 2 additions & 1 deletion ethcore/evm/src/interpreter/gasometer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

use std::cmp;
use util::*;
use bigint::prelude::U256;
use bigint::hash::H256;
use super::u256_to_address;

use {evm, vm};
Expand Down
2 changes: 1 addition & 1 deletion ethcore/evm/src/interpreter/informant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mod inner {
use evm::instructions::{Instruction, InstructionInfo, INSTRUCTIONS};
use evm::{CostType};

use util::U256;
use bigint::prelude::U256;

macro_rules! evm_debug {
($x: expr) => {
Expand Down
4 changes: 2 additions & 2 deletions ethcore/evm/src/interpreter/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 util::U256;
use bigint::prelude::U256;
use vm::ReturnData;

const MAX_RETURN_WASTE_BYTES: usize = 16384;
Expand Down Expand Up @@ -134,7 +134,7 @@ impl Memory for Vec<u8> {

#[cfg(test)]
mod tests {
use util::U256;
use bigint::prelude::U256;
use super::Memory;

#[test]
Expand Down
2 changes: 2 additions & 0 deletions ethcore/evm/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ use std::marker::PhantomData;
use std::{cmp, mem};
use std::sync::Arc;
use hash::keccak;
use bigint::prelude::{U256, U512};
use bigint::hash::H256;

use vm::{
self, ActionParams, ActionValue, CallType, MessageCallResult,
Expand Down
2 changes: 1 addition & 1 deletion ethcore/evm/src/interpreter/shared_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
use std::sync::Arc;
use hash::KECCAK_EMPTY;
use heapsize::HeapSizeOf;
use bigint::hash::H256;
use parking_lot::Mutex;
use util::H256;
use util::cache::MemoryLruCache;
use bit_set::BitSet;
use super::super::instructions;
Expand Down
2 changes: 2 additions & 0 deletions ethcore/evm/src/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

//! Just in time compiler execution environment.
use bigint::prelude::U256;
use bigint::hash::H256;
use util::*;
use evmjit;
use evm::{self, GasLeft};
Expand Down
1 change: 1 addition & 0 deletions ethcore/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern crate byteorder;
extern crate bit_set;
extern crate common_types as types;
extern crate ethcore_util as util;
extern crate ethcore_bigint as bigint;
extern crate ethjson;
extern crate rlp;
extern crate parity_wasm;
Expand Down
2 changes: 2 additions & 0 deletions ethcore/evm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ use std::hash::Hash;
use std::sync::Arc;
use std::collections::{HashMap, HashSet};
use rustc_hex::FromHex;
use bigint::prelude::U256;
use bigint::hash::H256;
use util::*;
use vm::{self, ActionParams, ActionValue};
use vm::tests::{FakeExt, FakeCall, FakeCallType, test_finalize};
Expand Down
1 change: 1 addition & 0 deletions ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion ethcore/light/src/cht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/src/client/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use ethcore::engines::{Engine, StateDependentProof};
use ethcore::header::Header;
use ethcore::receipt::Receipt;
use futures::future::IntoFuture;
use util::H256;
use bigint::hash::H256;

/// Provides full chain data.
pub trait ChainDataFetcher: Send + Sync + 'static {
Expand Down
3 changes: 2 additions & 1 deletion ethcore/light/src/client/header_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ use ethcore::engines::epoch::{

use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
use heapsize::HeapSizeOf;
use util::{H256, H256FastMap, H264, U256};
use bigint::prelude::U256;
use bigint::hash::{H256, H256FastMap, H264};
use util::kvdb::{DBTransaction, KeyValueDB};

use cache::Cache;
Expand Down
Loading