Merge pull request #6459 from paritytech/fo-6418-dont-export-bigint
Refactor: Don't reexport bigint from util
This commit is contained in:
commit
c49beccadc
20
Cargo.lock
generated
20
Cargo.lock
generated
@ -3,6 +3,7 @@ name = "wasm"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-logger 1.8.0",
|
"ethcore-logger 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -299,6 +300,7 @@ name = "common-types"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bloomable 0.1.0",
|
"bloomable 0.1.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"ethjson 0.1.0",
|
"ethjson 0.1.0",
|
||||||
"hash 0.1.0",
|
"hash 0.1.0",
|
||||||
@ -504,6 +506,7 @@ dependencies = [
|
|||||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethash 1.8.0",
|
"ethash 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-bloom-journal 0.1.0",
|
"ethcore-bloom-journal 0.1.0",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
@ -590,6 +593,7 @@ dependencies = [
|
|||||||
name = "ethcore-ipc"
|
name = "ethcore-ipc"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)",
|
"nanomsg 0.5.1 (git+https://github.com/paritytech/nanomsg.rs.git?branch=parity-1.7)",
|
||||||
@ -652,6 +656,7 @@ version = "1.8.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
@ -699,6 +704,7 @@ dependencies = [
|
|||||||
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
"ethcore-logger 1.8.0",
|
"ethcore-logger 1.8.0",
|
||||||
@ -730,6 +736,7 @@ dependencies = [
|
|||||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
"ethcore-ipc-codegen 1.8.0",
|
"ethcore-ipc-codegen 1.8.0",
|
||||||
@ -762,6 +769,7 @@ name = "ethcore-stratum"
|
|||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
"ethcore-ipc-codegen 1.8.0",
|
"ethcore-ipc-codegen 1.8.0",
|
||||||
@ -906,6 +914,7 @@ dependencies = [
|
|||||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
@ -935,6 +944,7 @@ dependencies = [
|
|||||||
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"common-types 0.1.0",
|
"common-types 0.1.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-logger 1.8.0",
|
"ethcore-logger 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"ethjson 0.1.0",
|
"ethjson 0.1.0",
|
||||||
@ -957,6 +967,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"ethjson 0.1.0",
|
"ethjson 0.1.0",
|
||||||
"evm 0.1.0",
|
"evm 0.1.0",
|
||||||
@ -1217,6 +1228,7 @@ dependencies = [
|
|||||||
name = "ipc-common-types"
|
name = "ipc-common-types"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
"ethcore-ipc-codegen 1.8.0",
|
"ethcore-ipc-codegen 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
@ -1652,6 +1664,7 @@ name = "node-filter"
|
|||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
"ethcore-network 1.8.0",
|
"ethcore-network 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
@ -1863,6 +1876,7 @@ dependencies = [
|
|||||||
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
@ -1925,6 +1939,7 @@ dependencies = [
|
|||||||
"base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"fetch 0.1.0",
|
"fetch 0.1.0",
|
||||||
@ -1973,6 +1988,7 @@ name = "parity-hash-fetch"
|
|||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"fetch 0.1.0",
|
"fetch 0.1.0",
|
||||||
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -1993,6 +2009,7 @@ version = "1.8.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"cid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"jsonrpc-http-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
|
"jsonrpc-http-server 7.0.0 (git+https://github.com/paritytech/jsonrpc.git?branch=parity-1.7)",
|
||||||
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@ -2032,6 +2049,7 @@ dependencies = [
|
|||||||
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethash 1.8.0",
|
"ethash 1.8.0",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-devtools 1.8.0",
|
"ethcore-devtools 1.8.0",
|
||||||
"ethcore-io 1.8.0",
|
"ethcore-io 1.8.0",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
@ -2145,6 +2163,7 @@ version = "1.8.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ethabi 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"ethcore 1.8.0",
|
"ethcore 1.8.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-ipc 1.8.0",
|
"ethcore-ipc 1.8.0",
|
||||||
"ethcore-ipc-codegen 1.8.0",
|
"ethcore-ipc-codegen 1.8.0",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
@ -3229,6 +3248,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"common-types 0.1.0",
|
"common-types 0.1.0",
|
||||||
|
"ethcore-bigint 0.1.3",
|
||||||
"ethcore-util 1.8.0",
|
"ethcore-util 1.8.0",
|
||||||
"ethjson 0.1.0",
|
"ethjson 0.1.0",
|
||||||
"evmjit 1.8.0",
|
"evmjit 1.8.0",
|
||||||
|
@ -34,6 +34,7 @@ jsonrpc-core = { git = "https://github.com/paritytech/jsonrpc.git", branch = "pa
|
|||||||
ethsync = { path = "sync" }
|
ethsync = { path = "sync" }
|
||||||
ethcore = { path = "ethcore" }
|
ethcore = { path = "ethcore" }
|
||||||
ethcore-util = { path = "util" }
|
ethcore-util = { path = "util" }
|
||||||
|
ethcore-bigint = { path = "util/bigint" }
|
||||||
ethcore-io = { path = "util/io" }
|
ethcore-io = { path = "util/io" }
|
||||||
ethcore-devtools = { path = "devtools" }
|
ethcore-devtools = { path = "devtools" }
|
||||||
ethcore-ipc = { path = "ipc/rpc" }
|
ethcore-ipc = { path = "ipc/rpc" }
|
||||||
|
@ -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" }
|
jsonrpc-http-server = { git = "https://github.com/paritytech/jsonrpc.git", branch = "parity-1.7" }
|
||||||
|
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
|
ethcore-bigint = { path = "../util/bigint" }
|
||||||
fetch = { path = "../util/fetch" }
|
fetch = { path = "../util/fetch" }
|
||||||
node-health = { path = "./node-health" }
|
node-health = { path = "./node-health" }
|
||||||
parity-hash-fetch = { path = "../hash-fetch" }
|
parity-hash-fetch = { path = "../hash-fetch" }
|
||||||
|
@ -20,7 +20,7 @@ use std::io::{self, Read, Write};
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use fetch::{self, Mime};
|
use fetch::{self, Mime};
|
||||||
use hash::keccak_buffer;
|
use hash::keccak_buffer;
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
use page::{LocalPageEndpoint, PageCache};
|
use page::{LocalPageEndpoint, PageCache};
|
||||||
use handlers::{ContentValidator, ValidatorResponse};
|
use handlers::{ContentValidator, ValidatorResponse};
|
||||||
|
@ -38,6 +38,7 @@ extern crate jsonrpc_core;
|
|||||||
extern crate jsonrpc_http_server;
|
extern crate jsonrpc_http_server;
|
||||||
|
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate fetch;
|
extern crate fetch;
|
||||||
extern crate node_health;
|
extern crate node_health;
|
||||||
extern crate parity_dapps_glue as parity_dapps;
|
extern crate parity_dapps_glue as parity_dapps;
|
||||||
|
@ -20,8 +20,9 @@ use std::collections::HashMap;
|
|||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
|
|
||||||
use hash_fetch::urlhint::ContractClient;
|
use hash_fetch::urlhint::ContractClient;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::{Bytes, Address, ToPretty};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::{Bytes, Address, H256, ToPretty};
|
|
||||||
|
|
||||||
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
|
const REGISTRAR: &'static str = "8e4e9b13d4b45cb0befc93c3061b1408f67316b2";
|
||||||
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
|
const URLHINT: &'static str = "deadbeefcafe0000000000000000000000000000";
|
||||||
|
@ -30,6 +30,7 @@ ethcore-ipc-nano = { path = "../ipc/nano" }
|
|||||||
ethcore-logger = { path = "../logger" }
|
ethcore-logger = { path = "../logger" }
|
||||||
ethcore-stratum = { path = "../stratum" }
|
ethcore-stratum = { path = "../stratum" }
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
|
ethcore-bigint = { path = "../util/bigint" }
|
||||||
ethjson = { path = "../json" }
|
ethjson = { path = "../json" }
|
||||||
ethkey = { path = "../ethkey" }
|
ethkey = { path = "../ethkey" }
|
||||||
ethstore = { path = "../ethstore" }
|
ethstore = { path = "../ethstore" }
|
||||||
|
@ -8,6 +8,7 @@ bit-set = "0.4"
|
|||||||
byteorder = "1.0"
|
byteorder = "1.0"
|
||||||
common-types = { path = "../types" }
|
common-types = { path = "../types" }
|
||||||
ethcore-util = { path = "../../util" }
|
ethcore-util = { path = "../../util" }
|
||||||
|
ethcore-bigint = { path = "../../util/bigint" }
|
||||||
evmjit = { path = "../../evmjit", optional = true }
|
evmjit = { path = "../../evmjit", optional = true }
|
||||||
ethjson = { path = "../../json" }
|
ethjson = { path = "../../json" }
|
||||||
heapsize = "0.4"
|
heapsize = "0.4"
|
||||||
|
@ -24,6 +24,8 @@ extern crate test;
|
|||||||
|
|
||||||
use self::test::{Bencher, black_box};
|
use self::test::{Bencher, black_box};
|
||||||
|
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use vm::ActionParams;
|
use vm::ActionParams;
|
||||||
use evm::{self, Factory, VMType};
|
use evm::{self, Factory, VMType};
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
//! Evm interface.
|
//! Evm interface.
|
||||||
|
|
||||||
use std::{ops, cmp, fmt};
|
use std::{ops, cmp, fmt};
|
||||||
use util::{U128, U256, U512};
|
|
||||||
|
use bigint::prelude::{U128, U256, U512};
|
||||||
use vm::{Ext, Result, ReturnData, GasLeft, Error};
|
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
|
/// Finalization result. Gas Left: either it is a known value, or it needs to be computed by processing
|
||||||
@ -149,7 +150,7 @@ impl CostType for usize {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use super::CostType;
|
use super::CostType;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
//!
|
//!
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use vm::Vm;
|
use vm::Vm;
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use super::interpreter::SharedCache;
|
use super::interpreter::SharedCache;
|
||||||
use super::vmtype::VMType;
|
use super::vmtype::VMType;
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use util::*;
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use super::u256_to_address;
|
use super::u256_to_address;
|
||||||
|
|
||||||
use {evm, vm};
|
use {evm, vm};
|
||||||
|
@ -43,7 +43,7 @@ mod inner {
|
|||||||
use evm::instructions::{Instruction, InstructionInfo, INSTRUCTIONS};
|
use evm::instructions::{Instruction, InstructionInfo, INSTRUCTIONS};
|
||||||
use evm::{CostType};
|
use evm::{CostType};
|
||||||
|
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
|
|
||||||
macro_rules! evm_debug {
|
macro_rules! evm_debug {
|
||||||
($x: expr) => {
|
($x: expr) => {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use vm::ReturnData;
|
use vm::ReturnData;
|
||||||
|
|
||||||
const MAX_RETURN_WASTE_BYTES: usize = 16384;
|
const MAX_RETURN_WASTE_BYTES: usize = 16384;
|
||||||
@ -134,7 +134,7 @@ impl Memory for Vec<u8> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use super::Memory;
|
use super::Memory;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -27,6 +27,8 @@ use std::marker::PhantomData;
|
|||||||
use std::{cmp, mem};
|
use std::{cmp, mem};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use bigint::prelude::{U256, U512};
|
||||||
|
use bigint::hash::H256;
|
||||||
|
|
||||||
use vm::{
|
use vm::{
|
||||||
self, ActionParams, ActionValue, CallType, MessageCallResult,
|
self, ActionParams, ActionValue, CallType, MessageCallResult,
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use hash::KECCAK_EMPTY;
|
use hash::KECCAK_EMPTY;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::H256;
|
|
||||||
use util::cache::MemoryLruCache;
|
use util::cache::MemoryLruCache;
|
||||||
use bit_set::BitSet;
|
use bit_set::BitSet;
|
||||||
use super::super::instructions;
|
use super::super::instructions;
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Just in time compiler execution environment.
|
//! Just in time compiler execution environment.
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use evmjit;
|
use evmjit;
|
||||||
use evm::{self, GasLeft};
|
use evm::{self, GasLeft};
|
||||||
|
@ -20,6 +20,7 @@ extern crate byteorder;
|
|||||||
extern crate bit_set;
|
extern crate bit_set;
|
||||||
extern crate common_types as types;
|
extern crate common_types as types;
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate ethjson;
|
extern crate ethjson;
|
||||||
extern crate rlp;
|
extern crate rlp;
|
||||||
extern crate parity_wasm;
|
extern crate parity_wasm;
|
||||||
|
@ -20,6 +20,8 @@ use std::hash::Hash;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use vm::{self, ActionParams, ActionValue};
|
use vm::{self, ActionParams, ActionValue};
|
||||||
use vm::tests::{FakeExt, FakeCall, FakeCallType, test_finalize};
|
use vm::tests::{FakeExt, FakeCall, FakeCallType, test_finalize};
|
||||||
|
@ -14,6 +14,7 @@ build = "build.rs"
|
|||||||
log = "0.3"
|
log = "0.3"
|
||||||
ethcore = { path = ".."}
|
ethcore = { path = ".."}
|
||||||
ethcore-util = { path = "../../util" }
|
ethcore-util = { path = "../../util" }
|
||||||
|
ethcore-bigint = { path = "../../util/bigint" }
|
||||||
ethcore-network = { path = "../../util/network" }
|
ethcore-network = { path = "../../util/network" }
|
||||||
ethcore-io = { path = "../../util/io" }
|
ethcore-io = { path = "../../util/io" }
|
||||||
ethcore-ipc = { path = "../../ipc/rpc", optional = true }
|
ethcore-ipc = { path = "../../ipc/rpc", optional = true }
|
||||||
|
@ -27,7 +27,8 @@ use ethcore::receipt::Receipt;
|
|||||||
use stats::Corpus;
|
use stats::Corpus;
|
||||||
use time::{SteadyTime, Duration};
|
use time::{SteadyTime, Duration};
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use util::{U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::cache::MemoryLruCache;
|
use util::cache::MemoryLruCache;
|
||||||
|
|
||||||
/// Configuration for how much data to cache.
|
/// Configuration for how much data to cache.
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
//! we discarded.
|
//! we discarded.
|
||||||
|
|
||||||
use ethcore::ids::BlockId;
|
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 util::trie::{self, TrieMut, TrieDBMut, Trie, TrieDB, Recorder};
|
||||||
use rlp::{RlpStream, UntrustedRlp};
|
use rlp::{RlpStream, UntrustedRlp};
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ use ethcore::engines::{Engine, StateDependentProof};
|
|||||||
use ethcore::header::Header;
|
use ethcore::header::Header;
|
||||||
use ethcore::receipt::Receipt;
|
use ethcore::receipt::Receipt;
|
||||||
use futures::future::IntoFuture;
|
use futures::future::IntoFuture;
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
/// Provides full chain data.
|
/// Provides full chain data.
|
||||||
pub trait ChainDataFetcher: Send + Sync + 'static {
|
pub trait ChainDataFetcher: Send + Sync + 'static {
|
||||||
|
@ -43,7 +43,8 @@ use ethcore::engines::epoch::{
|
|||||||
|
|
||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
|
use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp, UntrustedRlp};
|
||||||
use heapsize::HeapSizeOf;
|
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 util::kvdb::{DBTransaction, KeyValueDB};
|
||||||
|
|
||||||
use cache::Cache;
|
use cache::Cache;
|
||||||
|
@ -31,10 +31,11 @@ use ethcore::service::ClientIoMessage;
|
|||||||
use ethcore::encoded;
|
use ethcore::encoded;
|
||||||
use io::IoChannel;
|
use io::IoChannel;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use futures::{IntoFuture, Future};
|
use futures::{IntoFuture, Future};
|
||||||
|
|
||||||
use util::{Address, H256, U256};
|
use util::Address;
|
||||||
use util::kvdb::{KeyValueDB, CompactionProfile};
|
use util::kvdb::{KeyValueDB, CompactionProfile};
|
||||||
|
|
||||||
use self::fetch::ChainDataFetcher;
|
use self::fetch::ChainDataFetcher;
|
||||||
|
@ -70,6 +70,7 @@ extern crate bincode;
|
|||||||
extern crate ethcore_io as io;
|
extern crate ethcore_io as io;
|
||||||
extern crate ethcore_network as network;
|
extern crate ethcore_network as network;
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate ethcore;
|
extern crate ethcore;
|
||||||
extern crate evm;
|
extern crate evm;
|
||||||
extern crate heapsize;
|
extern crate heapsize;
|
||||||
|
@ -23,8 +23,9 @@ use ethcore::transaction::UnverifiedTransaction;
|
|||||||
use io::TimerToken;
|
use io::TimerToken;
|
||||||
use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
|
use network::{HostInfo, NetworkProtocolHandler, NetworkContext, PeerId};
|
||||||
use rlp::{RlpStream, UntrustedRlp};
|
use rlp::{RlpStream, UntrustedRlp};
|
||||||
use util::hash::H256;
|
use bigint::prelude::U256;
|
||||||
use util::{DBValue, U256};
|
use bigint::hash::H256;
|
||||||
|
use util::DBValue;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use time::{Duration, SteadyTime};
|
use time::{Duration, SteadyTime};
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ use request::{self, Request};
|
|||||||
use super::error::Error;
|
use super::error::Error;
|
||||||
|
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use time::{Duration, SteadyTime};
|
use time::{Duration, SteadyTime};
|
||||||
|
|
||||||
/// Credits value.
|
/// Credits value.
|
||||||
|
@ -27,7 +27,7 @@ use std::iter::FromIterator;
|
|||||||
use request::Request;
|
use request::Request;
|
||||||
use request::NetworkRequests as Requests;
|
use request::NetworkRequests as Requests;
|
||||||
use net::{timeout, ReqId};
|
use net::{timeout, ReqId};
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
|
|
||||||
use time::{Duration, SteadyTime};
|
use time::{Duration, SteadyTime};
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
//! Peer status and capabilities.
|
//! Peer status and capabilities.
|
||||||
|
|
||||||
use rlp::{DecoderError, Encodable, Decodable, RlpStream, UntrustedRlp};
|
use rlp::{DecoderError, Encodable, Decodable, RlpStream, UntrustedRlp};
|
||||||
use util::{H256, U256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
|
||||||
use super::request_credits::FlowParams;
|
use super::request_credits::FlowParams;
|
||||||
|
|
||||||
@ -373,7 +374,8 @@ pub fn write_announcement(announcement: &Announcement) -> Vec<u8> {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use super::super::request_credits::FlowParams;
|
use super::super::request_credits::FlowParams;
|
||||||
use util::{U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use rlp::{RlpStream, UntrustedRlp};
|
use rlp::{RlpStream, UntrustedRlp};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -32,7 +32,9 @@ use request;
|
|||||||
use request::*;
|
use request::*;
|
||||||
|
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use util::{Address, H256, U256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
@ -30,8 +30,10 @@ use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY, KECCAK_EMPTY_LIST_RLP, keccak};
|
|||||||
use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, OutputKind, Field};
|
use request::{self as net_request, IncompleteRequest, CompleteRequest, Output, OutputKind, Field};
|
||||||
|
|
||||||
use rlp::{RlpStream, UntrustedRlp};
|
use rlp::{RlpStream, UntrustedRlp};
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::{Address, Bytes, DBValue, HashDB, H256, U256};
|
use util::{Address, Bytes, DBValue, HashDB};
|
||||||
use util::memorydb::MemoryDB;
|
use util::memorydb::MemoryDB;
|
||||||
use util::trie::{Trie, TrieDB, TrieError};
|
use util::trie::{Trie, TrieDB, TrieError};
|
||||||
|
|
||||||
@ -891,8 +893,9 @@ impl Signal {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::{MemoryDB, Address};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::{MemoryDB, Address, H256};
|
|
||||||
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
use util::trie::{Trie, TrieMut, SecTrieDB, SecTrieDBMut};
|
||||||
use util::trie::recorder::Recorder;
|
use util::trie::recorder::Recorder;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
@ -22,8 +22,8 @@ use ethcore::header::{Header, Seal};
|
|||||||
use futures::Future;
|
use futures::Future;
|
||||||
use network::{PeerId, NodeId};
|
use network::{PeerId, NodeId};
|
||||||
use net::*;
|
use net::*;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::H256;
|
|
||||||
use time::Duration;
|
use time::Duration;
|
||||||
use ::request::{self as basic_request, Response};
|
use ::request::{self as basic_request, Response};
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ use ethcore::client::{BlockChainClient, ProvingBlockChainClient};
|
|||||||
use ethcore::transaction::PendingTransaction;
|
use ethcore::transaction::PendingTransaction;
|
||||||
use ethcore::ids::BlockId;
|
use ethcore::ids::BlockId;
|
||||||
use ethcore::encoded;
|
use ethcore::encoded;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use util::H256;
|
|
||||||
|
|
||||||
use cht::{self, BlockInfo};
|
use cht::{self, BlockInfo};
|
||||||
use client::{LightChainClient, AsLightClient};
|
use client::{LightChainClient, AsLightClient};
|
||||||
|
@ -28,7 +28,9 @@ use std::collections::hash_map::Entry;
|
|||||||
|
|
||||||
use ethcore::error::{TransactionError, TransactionImportResult};
|
use ethcore::error::{TransactionError, TransactionImportResult};
|
||||||
use ethcore::transaction::{Condition, PendingTransaction, SignedTransaction};
|
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.
|
// Knowledge of an account's current nonce.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
@ -211,7 +211,7 @@ impl<T: IncompleteRequest> DerefMut for Requests<T> {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use request::*;
|
use request::*;
|
||||||
use super::RequestBuilder;
|
use super::RequestBuilder;
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn all_scalar() {
|
fn all_scalar() {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
//! Light protocol request types.
|
//! Light protocol request types.
|
||||||
|
|
||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
mod builder;
|
mod builder;
|
||||||
|
|
||||||
@ -787,7 +787,9 @@ pub mod header {
|
|||||||
pub mod header_proof {
|
pub mod header_proof {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
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.
|
/// Potentially incomplete header proof request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -881,7 +883,7 @@ pub mod header_proof {
|
|||||||
/// Request and response for transaction index.
|
/// Request and response for transaction index.
|
||||||
pub mod transaction_index {
|
pub mod transaction_index {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
/// Potentially incomplete transaction index request.
|
/// Potentially incomplete transaction index request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -959,7 +961,7 @@ pub mod transaction_index {
|
|||||||
pub mod block_receipts {
|
pub mod block_receipts {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use ethcore::receipt::Receipt;
|
use ethcore::receipt::Receipt;
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
/// Potentially incomplete block receipts request.
|
/// Potentially incomplete block receipts request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -1028,7 +1030,7 @@ pub mod block_body {
|
|||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use ethcore::encoded;
|
use ethcore::encoded;
|
||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
/// Potentially incomplete block body request.
|
/// Potentially incomplete block body request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -1116,7 +1118,9 @@ pub mod block_body {
|
|||||||
/// A request for an account proof.
|
/// A request for an account proof.
|
||||||
pub mod account {
|
pub mod account {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
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.
|
/// Potentially incomplete request for an account proof.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -1215,7 +1219,8 @@ pub mod account {
|
|||||||
/// A request for a storage proof.
|
/// A request for a storage proof.
|
||||||
pub mod storage {
|
pub mod storage {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use util::{Bytes, H256};
|
use bigint::hash::H256;
|
||||||
|
use util::Bytes;
|
||||||
|
|
||||||
/// Potentially incomplete request for an storage proof.
|
/// Potentially incomplete request for an storage proof.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -1323,7 +1328,8 @@ pub mod storage {
|
|||||||
/// A request for contract code.
|
/// A request for contract code.
|
||||||
pub mod contract_code {
|
pub mod contract_code {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use util::{Bytes, H256};
|
use bigint::hash::H256;
|
||||||
|
use util::Bytes;
|
||||||
|
|
||||||
/// Potentially incomplete contract code request.
|
/// Potentially incomplete contract code request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -1409,7 +1415,9 @@ pub mod execution {
|
|||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use ethcore::transaction::Action;
|
use ethcore::transaction::Action;
|
||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
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.
|
/// Potentially incomplete execution proof request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)]
|
||||||
@ -1532,7 +1540,8 @@ pub mod execution {
|
|||||||
pub mod epoch_signal {
|
pub mod epoch_signal {
|
||||||
use super::{Field, NoSuchOutput, OutputKind, Output};
|
use super::{Field, NoSuchOutput, OutputKind, Output};
|
||||||
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
use rlp::{Encodable, Decodable, DecoderError, RlpStream, UntrustedRlp};
|
||||||
use util::{Bytes, H256};
|
use bigint::hash::H256;
|
||||||
|
use util::Bytes;
|
||||||
|
|
||||||
/// Potentially incomplete epoch signal request.
|
/// Potentially incomplete epoch signal request.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
@ -1716,7 +1725,7 @@ mod tests {
|
|||||||
let full_req = Request::TransactionIndex(req.clone());
|
let full_req = Request::TransactionIndex(req.clone());
|
||||||
let res = TransactionIndexResponse {
|
let res = TransactionIndexResponse {
|
||||||
num: 1000,
|
num: 1000,
|
||||||
hash: ::util::H256::random(),
|
hash: ::bigint::hash::H256::random(),
|
||||||
index: 4,
|
index: 4,
|
||||||
};
|
};
|
||||||
let full_res = Response::TransactionIndex(res.clone());
|
let full_res = Response::TransactionIndex(res.clone());
|
||||||
|
@ -9,6 +9,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
ethcore = { path = ".."}
|
ethcore = { path = ".."}
|
||||||
ethcore-util = { path = "../../util" }
|
ethcore-util = { path = "../../util" }
|
||||||
|
ethcore-bigint = { path = "../../util/bigint" }
|
||||||
ethcore-io = { path = "../../util/io" }
|
ethcore-io = { path = "../../util/io" }
|
||||||
ethcore-network = { path = "../../util/network" }
|
ethcore-network = { path = "../../util/network" }
|
||||||
native-contracts = { path = "../native_contracts" }
|
native-contracts = { path = "../native_contracts" }
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
extern crate ethcore;
|
extern crate ethcore;
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate ethcore_network as network;
|
extern crate ethcore_network as network;
|
||||||
extern crate native_contracts;
|
extern crate native_contracts;
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
@ -30,7 +31,8 @@ use std::collections::HashMap;
|
|||||||
use native_contracts::PeerSet as Contract;
|
use native_contracts::PeerSet as Contract;
|
||||||
use network::{NodeId, ConnectionFilter, ConnectionDirection};
|
use network::{NodeId, ConnectionFilter, ConnectionDirection};
|
||||||
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
|
use ethcore::client::{BlockChainClient, BlockId, ChainNotify};
|
||||||
use util::{Address, H256, Bytes};
|
use bigint::hash::H256;
|
||||||
|
use util::{Address, Bytes};
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use futures::Future;
|
use futures::Future;
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
//! DB backend wrapper for Account trie
|
//! DB backend wrapper for Account trie
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use hash::{KECCAK_NULL_RLP, keccak};
|
use hash::{KECCAK_NULL_RLP, keccak};
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::NULL_RLP;
|
use rlp::NULL_RLP;
|
||||||
|
|
||||||
|
@ -794,7 +794,7 @@ mod tests {
|
|||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use ethstore::ethkey::{Generator, Random, Address};
|
use ethstore::ethkey::{Generator, Random, Address};
|
||||||
use ethstore::{StoreAccountRef, Derivation};
|
use ethstore::{StoreAccountRef, Derivation};
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn unlock_account_temp() {
|
fn unlock_account_temp() {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
pub type LogBloom = ::log_entry::LogBloom;
|
pub type LogBloom = ::log_entry::LogBloom;
|
||||||
|
|
||||||
/// Constant 2048-bit datum for 0. Often used as a default.
|
/// Constant 2048-bit datum for 0. Often used as a default.
|
||||||
pub static ZERO_LOGBLOOM: LogBloom = ::util::hash::H2048([0x00; 256]);
|
pub static ZERO_LOGBLOOM: LogBloom = ::bigint::hash::H2048([0x00; 256]);
|
||||||
|
|
||||||
#[cfg_attr(feature="dev", allow(enum_variant_names))]
|
#[cfg_attr(feature="dev", allow(enum_variant_names))]
|
||||||
/// Semantic boolean for when a seal/signature is included.
|
/// Semantic boolean for when a seal/signature is included.
|
||||||
|
@ -23,7 +23,9 @@ use hash::{keccak, KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP};
|
|||||||
use triehash::ordered_trie_root;
|
use triehash::ordered_trie_root;
|
||||||
|
|
||||||
use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError};
|
use rlp::{UntrustedRlp, RlpStream, Encodable, Decodable, DecoderError};
|
||||||
use util::{Bytes, Address, U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::{Bytes, Address};
|
||||||
use util::error::{Mismatch, OutOfBounds};
|
use util::error::{Mismatch, OutOfBounds};
|
||||||
|
|
||||||
use basic_types::{LogBloom, Seal};
|
use basic_types::{LogBloom, Seal};
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::{Bytes, U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::Bytes;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
|
|
||||||
/// Best block info.
|
/// Best block info.
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::{U256,H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
|
|
||||||
/// Brief info about inserted block.
|
/// Brief info about inserted block.
|
||||||
|
@ -22,6 +22,8 @@ use std::mem;
|
|||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use bloomchain as bc;
|
use bloomchain as bc;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H2048};
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
@ -624,7 +626,7 @@ impl BlockChain {
|
|||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
if let Some(extras) = self.db.read(db::COL_EXTRA, &best_block_hash) as Option<BlockDetails> {
|
if let Some(extras) = self.db.read(db::COL_EXTRA, &best_block_hash) as Option<BlockDetails> {
|
||||||
type DetailsKey = Key<BlockDetails, Target=H264>;
|
type DetailsKey = Key<BlockDetails, Target=::bigint::hash::H264>;
|
||||||
batch.delete(db::COL_EXTRA, &(DetailsKey::key(&best_block_hash)));
|
batch.delete(db::COL_EXTRA, &(DetailsKey::key(&best_block_hash)));
|
||||||
let hash = extras.parent;
|
let hash = extras.parent;
|
||||||
let range = extras.number as bc::Number .. extras.number as bc::Number;
|
let range = extras.number as bc::Number .. extras.number as bc::Number;
|
||||||
@ -1470,7 +1472,7 @@ mod tests {
|
|||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::kvdb::KeyValueDB;
|
use util::kvdb::KeyValueDB;
|
||||||
use util::hash::*;
|
use bigint::hash::*;
|
||||||
use receipt::Receipt;
|
use receipt::Receipt;
|
||||||
use blockchain::{BlockProvider, BlockChain, Config, ImportRoute};
|
use blockchain::{BlockProvider, BlockChain, Config, ImportRoute};
|
||||||
use tests::helpers::*;
|
use tests::helpers::*;
|
||||||
|
@ -26,7 +26,8 @@ use header::BlockNumber;
|
|||||||
use receipt::Receipt;
|
use receipt::Receipt;
|
||||||
|
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use util::{H256, H264, U256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H264};
|
||||||
use util::kvdb::PREFIX_LEN as DB_PREFIX_LEN;
|
use util::kvdb::PREFIX_LEN as DB_PREFIX_LEN;
|
||||||
|
|
||||||
/// Represents index of extra data in database
|
/// Represents index of extra data in database
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use util::{H256, H2048};
|
use bigint::hash::{H256, H2048};
|
||||||
use util::bytes::Bytes;
|
use util::bytes::Bytes;
|
||||||
use header::Header;
|
use header::Header;
|
||||||
use transaction::SignedTransaction;
|
use transaction::SignedTransaction;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::hash::H2048;
|
use bigint::hash::H2048;
|
||||||
|
|
||||||
pub trait WithBloom {
|
pub trait WithBloom {
|
||||||
fn with_bloom(self, bloom: H2048) -> Self where Self: Sized;
|
fn with_bloom(self, bloom: H2048) -> Self where Self: Sized;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::bytes::Bytes;
|
use util::bytes::Bytes;
|
||||||
use views::BlockView;
|
use views::BlockView;
|
||||||
|
|
||||||
|
@ -14,7 +14,9 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::{U256, H2048, Bytes};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H2048;
|
||||||
|
use util::Bytes;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use transaction::SignedTransaction;
|
use transaction::SignedTransaction;
|
||||||
use super::fork::Fork;
|
use super::fork::Fork;
|
||||||
@ -110,7 +112,7 @@ impl Iterator for ChainGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::hash::{H256, H2048};
|
use bigint::hash::{H256, H2048};
|
||||||
use views::BlockView;
|
use views::BlockView;
|
||||||
use blockchain::generator::{ChainIterator, ChainGenerator, BlockFinalizer};
|
use blockchain::generator::{ChainIterator, ChainGenerator, BlockFinalizer};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! Import route.
|
//! Import route.
|
||||||
|
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
use blockchain::block_info::{BlockInfo, BlockLocation};
|
use blockchain::block_info::{BlockInfo, BlockLocation};
|
||||||
|
|
||||||
/// Import route for newly inserted block.
|
/// Import route for newly inserted block.
|
||||||
@ -67,7 +67,8 @@ impl From<BlockInfo> for ImportRoute {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::{U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use blockchain::block_info::{BlockInfo, BlockLocation, BranchBecomingCanonChainData};
|
use blockchain::block_info::{BlockInfo, BlockLocation, BranchBecomingCanonChainData};
|
||||||
use blockchain::ImportRoute;
|
use blockchain::ImportRoute;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use blockchain::block_info::BlockInfo;
|
use blockchain::block_info::BlockInfo;
|
||||||
use blooms::BloomGroup;
|
use blooms::BloomGroup;
|
||||||
|
@ -24,7 +24,9 @@ use crypto::digest::Digest;
|
|||||||
use num::{BigUint, Zero, One};
|
use num::{BigUint, Zero, One};
|
||||||
|
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::{U256, H256, BytesRef};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::BytesRef;
|
||||||
use ethkey::{Signature, recover as ec_recover};
|
use ethkey::{Signature, recover as ec_recover};
|
||||||
use ethjson;
|
use ethjson;
|
||||||
|
|
||||||
@ -506,7 +508,8 @@ impl Impl for Bn128PairingImpl {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::{Builtin, Linear, ethereum_builtin, Pricer, Modexp, modexp as me};
|
use super::{Builtin, Linear, ethereum_builtin, Pricer, Modexp, modexp as me};
|
||||||
use ethjson;
|
use ethjson;
|
||||||
use util::{U256, BytesRef};
|
use bigint::prelude::U256;
|
||||||
|
use util::BytesRef;
|
||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
use num::{BigUint, Zero, One};
|
use num::{BigUint, Zero, One};
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use ipc::IpcConfig;
|
use ipc::IpcConfig;
|
||||||
use util::{H256, Bytes};
|
use bigint::hash::H256;
|
||||||
|
use util::Bytes;
|
||||||
|
|
||||||
/// Represents what has to be handled by actor listening to chain events
|
/// Represents what has to be handled by actor listening to chain events
|
||||||
#[ipc]
|
#[ipc]
|
||||||
|
@ -27,11 +27,13 @@ use hash::keccak;
|
|||||||
use timer::PerfTimer;
|
use timer::PerfTimer;
|
||||||
use util::Bytes;
|
use util::Bytes;
|
||||||
use util::{journaldb, DBValue, TrieFactory, Trie};
|
use util::{journaldb, DBValue, TrieFactory, Trie};
|
||||||
use util::{U256, H256, Address, H2048};
|
use util::Address;
|
||||||
use util::trie::TrieSpec;
|
use util::trie::TrieSpec;
|
||||||
use util::kvdb::*;
|
use util::kvdb::*;
|
||||||
|
|
||||||
// other
|
// other
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H2048};
|
||||||
use basic_types::Seal;
|
use basic_types::Seal;
|
||||||
use block::*;
|
use block::*;
|
||||||
use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute};
|
use blockchain::{BlockChain, BlockProvider, TreeRoute, ImportRoute};
|
||||||
|
@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use util::{self, U256, H256, journaldb, trie};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::{self, journaldb, trie};
|
||||||
use util::kvdb::{self, KeyValueDB};
|
use util::kvdb::{self, KeyValueDB};
|
||||||
use {state, state_db, client, executive, trace, transaction, db, spec, pod_state};
|
use {state, state_db, client, executive, trace, transaction, db, spec, pod_state};
|
||||||
use factory::Factories;
|
use factory::Factories;
|
||||||
@ -166,7 +168,7 @@ impl<'a> EvmTestClient<'a> {
|
|||||||
author: *genesis.author(),
|
author: *genesis.author(),
|
||||||
timestamp: genesis.timestamp(),
|
timestamp: genesis.timestamp(),
|
||||||
difficulty: *genesis.difficulty(),
|
difficulty: *genesis.difficulty(),
|
||||||
last_hashes: Arc::new([util::H256::default(); 256].to_vec()),
|
last_hashes: Arc::new([H256::default(); 256].to_vec()),
|
||||||
gas_used: 0.into(),
|
gas_used: 0.into(),
|
||||||
gas_limit: *genesis.gas_limit(),
|
gas_limit: *genesis.gas_limit(),
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,8 @@ use std::mem;
|
|||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H2048};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
//! Bridge between Tracedb and Blockchain.
|
//! Bridge between Tracedb and Blockchain.
|
||||||
|
|
||||||
use util::{H256};
|
use bigint::hash::H256;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use trace::DatabaseExtras as TraceDatabaseExtras;
|
use trace::DatabaseExtras as TraceDatabaseExtras;
|
||||||
use blockchain::{BlockChain, BlockProvider};
|
use blockchain::{BlockChain, BlockProvider};
|
||||||
|
@ -34,7 +34,9 @@ use trace::LocalizedTrace;
|
|||||||
use transaction::{LocalizedTransaction, PendingTransaction, SignedTransaction};
|
use transaction::{LocalizedTransaction, PendingTransaction, SignedTransaction};
|
||||||
use verification::queue::QueueInfo as BlockQueueInfo;
|
use verification::queue::QueueInfo as BlockQueueInfo;
|
||||||
|
|
||||||
use util::{U256, Address, H256, H2048, Bytes};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H2048};
|
||||||
|
use util::{Address, Bytes};
|
||||||
use util::hashdb::DBValue;
|
use util::hashdb::DBValue;
|
||||||
|
|
||||||
use types::ids::*;
|
use types::ids::*;
|
||||||
|
@ -30,7 +30,9 @@ use views;
|
|||||||
|
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use util::{Address, H256, H2048, U256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H2048};
|
||||||
|
use util::Address;
|
||||||
use rlp::Rlp;
|
use rlp::Rlp;
|
||||||
|
|
||||||
/// Owning header view.
|
/// Owning header view.
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
use std::collections::{VecDeque};
|
use std::collections::{VecDeque};
|
||||||
use std::collections::hash_map::{HashMap, Entry};
|
use std::collections::hash_map::{HashMap, Entry};
|
||||||
|
|
||||||
use util::{Address, H256};
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
|
|
||||||
use engines::validator_set::SimpleList;
|
use engines::validator_set::SimpleList;
|
||||||
|
|
||||||
@ -149,7 +150,8 @@ impl<'a> Iterator for Iter<'a> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::{Address, H256};
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
use super::RollingFinality;
|
use super::RollingFinality;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -42,6 +42,8 @@ use ethkey::{verify_address, Signature};
|
|||||||
use io::{IoContext, IoHandler, TimerToken, IoService};
|
use io::{IoContext, IoHandler, TimerToken, IoService};
|
||||||
use itertools::{self, Itertools};
|
use itertools::{self, Itertools};
|
||||||
use rlp::{UntrustedRlp, encode};
|
use rlp::{UntrustedRlp, encode};
|
||||||
|
use bigint::prelude::{U256, U128};
|
||||||
|
use bigint::hash::{H256, H520};
|
||||||
use semantic_version::SemanticVersion;
|
use semantic_version::SemanticVersion;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
@ -840,7 +842,8 @@ mod tests {
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
|
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::*;
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H520;
|
||||||
use header::Header;
|
use header::Header;
|
||||||
use error::{Error, BlockError};
|
use error::{Error, BlockError};
|
||||||
use rlp::encode;
|
use rlp::encode;
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
use std::sync::{Weak, Arc};
|
use std::sync::{Weak, Arc};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H520};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use ethkey::{recover, public_to_address, Signature};
|
use ethkey::{recover, public_to_address, Signature};
|
||||||
@ -255,7 +257,7 @@ impl Engine for BasicAuthority {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::*;
|
use bigint::hash::H520;
|
||||||
use block::*;
|
use block::*;
|
||||||
use error::{BlockError, Error};
|
use error::{BlockError, Error};
|
||||||
use tests::helpers::*;
|
use tests::helpers::*;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! Epoch verifiers and transitions.
|
//! Epoch verifiers and transitions.
|
||||||
|
|
||||||
use util::H256;
|
use bigint::hash::H256;
|
||||||
use error::Error;
|
use error::Error;
|
||||||
use header::Header;
|
use header::Header;
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ impl Engine for InstantSeal {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use bigint::hash::H520;
|
||||||
use util::*;
|
use util::*;
|
||||||
use tests::helpers::*;
|
use tests::helpers::*;
|
||||||
use spec::Spec;
|
use spec::Spec;
|
||||||
|
@ -54,6 +54,8 @@ use spec::CommonParams;
|
|||||||
use transaction::{UnverifiedTransaction, SignedTransaction};
|
use transaction::{UnverifiedTransaction, SignedTransaction};
|
||||||
|
|
||||||
use ethkey::Signature;
|
use ethkey::Signature;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use semantic_version::SemanticVersion;
|
use semantic_version::SemanticVersion;
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
@ -414,6 +416,8 @@ pub mod common {
|
|||||||
use state::Substate;
|
use state::Substate;
|
||||||
use state::CleanupMode;
|
use state::CleanupMode;
|
||||||
|
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use super::Engine;
|
use super::Engine;
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ use std::collections::BTreeMap;
|
|||||||
use util::Address;
|
use util::Address;
|
||||||
use builtin::Builtin;
|
use builtin::Builtin;
|
||||||
use block::{ExecutedBlock, IsBlock};
|
use block::{ExecutedBlock, IsBlock};
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use engines::Engine;
|
use engines::Engine;
|
||||||
use spec::CommonParams;
|
use spec::CommonParams;
|
||||||
use evm::Schedule;
|
use evm::Schedule;
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
//! A signer used by Engines which need to sign messages.
|
//! A signer used by Engines which need to sign messages.
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use util::{H256, Address};
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
use ethkey::Signature;
|
use ethkey::Signature;
|
||||||
use account_provider::{self, AccountProvider};
|
use account_provider::{self, AccountProvider};
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use bigint::hash::{H256, H520};
|
||||||
use util::*;
|
use util::*;
|
||||||
use super::{Height, View, BlockHash, Step};
|
use super::{Height, View, BlockHash, Step};
|
||||||
use error::Error;
|
use error::Error;
|
||||||
@ -202,7 +203,6 @@ pub fn message_hash(vote_step: VoteStep, block_hash: H256) -> H256 {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use util::*;
|
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use account_provider::AccountProvider;
|
use account_provider::AccountProvider;
|
||||||
use header::Header;
|
use header::Header;
|
||||||
|
@ -30,6 +30,8 @@ use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
|
|||||||
use std::collections::{HashSet, BTreeMap, HashMap};
|
use std::collections::{HashSet, BTreeMap, HashMap};
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
|
use bigint::prelude::{U128, U256};
|
||||||
|
use bigint::hash::{H256, H520};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use client::EngineClient;
|
use client::EngineClient;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
/// It can also report validators for misbehaviour with two levels: `reportMalicious` and `reportBenign`.
|
/// It can also report validators for misbehaviour with two levels: `reportMalicious` and `reportBenign`.
|
||||||
|
|
||||||
use std::sync::Weak;
|
use std::sync::Weak;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
|
|
||||||
@ -130,6 +131,7 @@ mod tests {
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use bigint::hash::H520;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::encode;
|
use rlp::encode;
|
||||||
use spec::Spec;
|
use spec::Spec;
|
||||||
|
@ -25,7 +25,8 @@ mod multi;
|
|||||||
|
|
||||||
use std::sync::Weak;
|
use std::sync::Weak;
|
||||||
use ids::BlockId;
|
use ids::BlockId;
|
||||||
use util::{Bytes, Address, H256};
|
use bigint::hash::H256;
|
||||||
|
use util::{Bytes, Address};
|
||||||
use ethjson::spec::ValidatorSet as ValidatorSpec;
|
use ethjson::spec::ValidatorSet as ValidatorSpec;
|
||||||
use client::EngineClient;
|
use client::EngineClient;
|
||||||
use header::{Header, BlockNumber};
|
use header::{Header, BlockNumber};
|
||||||
|
@ -19,8 +19,9 @@
|
|||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::sync::Weak;
|
use std::sync::Weak;
|
||||||
use engines::{Call, Engine};
|
use engines::{Call, Engine};
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use util::{Bytes, H256, Address};
|
use util::{Bytes, Address};
|
||||||
use ids::BlockId;
|
use ids::BlockId;
|
||||||
use header::{BlockNumber, Header};
|
use header::{BlockNumber, Header};
|
||||||
use client::EngineClient;
|
use client::EngineClient;
|
||||||
|
@ -21,7 +21,10 @@ use futures::Future;
|
|||||||
use native_contracts::ValidatorSet as Provider;
|
use native_contracts::ValidatorSet as Provider;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H160, H256};
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
|
|
||||||
use util::*;
|
use util::*;
|
||||||
use util::cache::MemoryLruCache;
|
use util::cache::MemoryLruCache;
|
||||||
use rlp::{UntrustedRlp, RlpStream};
|
use rlp::{UntrustedRlp, RlpStream};
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
/// Preconfigured validator list.
|
/// Preconfigured validator list.
|
||||||
|
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use util::{H256, Address};
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
|
|
||||||
use engines::{Call, Engine};
|
use engines::{Call, Engine};
|
||||||
use header::{BlockNumber, Header};
|
use header::{BlockNumber, Header};
|
||||||
|
@ -20,7 +20,8 @@ use std::str::FromStr;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
|
use std::sync::atomic::{AtomicUsize, Ordering as AtomicOrdering};
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use util::{Bytes, H256, Address};
|
use bigint::hash::H256;
|
||||||
|
use util::{Bytes, Address};
|
||||||
|
|
||||||
use engines::{Call, Engine};
|
use engines::{Call, Engine};
|
||||||
use header::{Header, BlockNumber};
|
use header::{Header, BlockNumber};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::collections::{BTreeMap, HashSet, HashMap};
|
use std::collections::{BTreeMap, HashSet, HashMap};
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
|
use bigint::hash::{H256, H520};
|
||||||
use parking_lot:: RwLock;
|
use parking_lot:: RwLock;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::{Encodable, RlpStream};
|
use rlp::{Encodable, RlpStream};
|
||||||
@ -208,6 +209,7 @@ impl <M: Message + Default + Encodable + Debug> VoteCollector<M> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use bigint::hash::H160;
|
||||||
use util::*;
|
use util::*;
|
||||||
use rlp::*;
|
use rlp::*;
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
//! General error types for use in ethcore.
|
//! General error types for use in ethcore.
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use io::*;
|
use io::*;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
use util::*;
|
use bigint::prelude::U256;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
/// 1 Ether in Wei
|
/// 1 Ether in Wei
|
||||||
|
@ -20,6 +20,8 @@ use std::collections::{BTreeMap, HashMap};
|
|||||||
use std::sync::{Arc, Weak};
|
use std::sync::{Arc, Weak};
|
||||||
use hash::{KECCAK_EMPTY_LIST_RLP};
|
use hash::{KECCAK_EMPTY_LIST_RLP};
|
||||||
use ethash::{quick_get_difficulty, slow_get_seedhash, EthashManager};
|
use ethash::{quick_get_difficulty, slow_get_seedhash, EthashManager};
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H256, H64};
|
||||||
use util::*;
|
use util::*;
|
||||||
use block::*;
|
use block::*;
|
||||||
use builtin::Builtin;
|
use builtin::Builtin;
|
||||||
@ -607,6 +609,8 @@ mod tests {
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H64, H256};
|
||||||
use util::*;
|
use util::*;
|
||||||
use block::*;
|
use block::*;
|
||||||
use tests::helpers::*;
|
use tests::helpers::*;
|
||||||
|
@ -92,7 +92,7 @@ pub fn new_metropolis_test() -> Spec { load(None, include_bytes!("../../res/ethe
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::*;
|
use bigint::prelude::U256;
|
||||||
use state::*;
|
use state::*;
|
||||||
use super::*;
|
use super::*;
|
||||||
use tests::helpers::*;
|
use tests::helpers::*;
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
//! Transaction execution format module.
|
//! Transaction execution format module.
|
||||||
|
|
||||||
use util::{Bytes, U256, Address, U512, trie};
|
use bigint::prelude::{U256, U512};
|
||||||
|
use util::{Bytes, Address, trie};
|
||||||
use vm;
|
use vm;
|
||||||
use trace::{VMTrace, FlatTrace};
|
use trace::{VMTrace, FlatTrace};
|
||||||
use log_entry::LogEntry;
|
use log_entry::LogEntry;
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
use bigint::prelude::{U256, U512};
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use state::{Backend as StateBackend, State, Substate, CleanupMode};
|
use state::{Backend as StateBackend, State, Substate, CleanupMode};
|
||||||
use engines::Engine;
|
use engines::Engine;
|
||||||
@ -659,7 +661,9 @@ mod tests {
|
|||||||
use rustc_hex::FromHex;
|
use rustc_hex::FromHex;
|
||||||
use ethkey::{Generator, Random};
|
use ethkey::{Generator, Random};
|
||||||
use super::*;
|
use super::*;
|
||||||
use util::{H256, U256, U512, Address};
|
use bigint::prelude::{U256, U512};
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
use util::bytes::BytesRef;
|
use util::bytes::BytesRef;
|
||||||
use vm::{ActionParams, ActionValue, CallType, EnvInfo, CreateContractAddress};
|
use vm::{ActionParams, ActionValue, CallType, EnvInfo, CreateContractAddress};
|
||||||
use evm::{Factory, VMType};
|
use evm::{Factory, VMType};
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
//! Transaction Execution environment.
|
//! Transaction Execution environment.
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use state::{Backend as StateBackend, State, Substate, CleanupMode};
|
use state::{Backend as StateBackend, State, Substate, CleanupMode};
|
||||||
use engines::Engine;
|
use engines::Engine;
|
||||||
|
@ -20,6 +20,8 @@ use std::cmp;
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP, keccak};
|
use hash::{KECCAK_NULL_RLP, KECCAK_EMPTY_LIST_RLP, keccak};
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use util::*;
|
use util::*;
|
||||||
use basic_types::{LogBloom, ZERO_LOGBLOOM};
|
use basic_types::{LogBloom, ZERO_LOGBLOOM};
|
||||||
use time::get_time;
|
use time::get_time;
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
pub use bigint::prelude::U256;
|
||||||
|
pub use bigint::hash::H256;
|
||||||
pub use util::*;
|
pub use util::*;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
use ethjson;
|
use ethjson;
|
||||||
use util::trie::{TrieFactory, TrieSpec};
|
use util::trie::{TrieFactory, TrieSpec};
|
||||||
use util::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::memorydb::MemoryDB;
|
use util::memorydb::MemoryDB;
|
||||||
|
|
||||||
fn test_trie(json: &[u8], trie: TrieSpec) -> Vec<String> {
|
fn test_trie(json: &[u8], trie: TrieSpec) -> Vec<String> {
|
||||||
|
@ -85,6 +85,7 @@ extern crate ethcore_bloom_journal as bloom_journal;
|
|||||||
extern crate ethcore_devtools as devtools;
|
extern crate ethcore_devtools as devtools;
|
||||||
extern crate ethcore_io as io;
|
extern crate ethcore_io as io;
|
||||||
extern crate ethcore_ipc_nano as nanoipc;
|
extern crate ethcore_ipc_nano as nanoipc;
|
||||||
|
extern crate ethcore_bigint as bigint;
|
||||||
extern crate ethcore_logger;
|
extern crate ethcore_logger;
|
||||||
extern crate ethcore_stratum;
|
extern crate ethcore_stratum;
|
||||||
extern crate ethjson;
|
extern crate ethjson;
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use util::Bytes;
|
use bigint::hash::H256;
|
||||||
use util::{Address, H256};
|
use util::{Address, Bytes};
|
||||||
use util::kvdb::Database;
|
use util::kvdb::Database;
|
||||||
use util::migration::{Batch, Config, Error, Migration, SimpleMigration, Progress};
|
use util::migration::{Batch, Config, Error, Migration, SimpleMigration, Progress};
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
@ -24,7 +24,8 @@ use views::HeaderView;
|
|||||||
use bloom_journal::Bloom;
|
use bloom_journal::Bloom;
|
||||||
use util::migration::{Error, Migration, Progress, Batch, Config};
|
use util::migration::{Error, Migration, Progress, Batch, Config};
|
||||||
use util::journaldb;
|
use util::journaldb;
|
||||||
use util::{H256, Trie};
|
use bigint::hash::H256;
|
||||||
|
use util::Trie;
|
||||||
use util::{Database, DBTransaction};
|
use util::{Database, DBTransaction};
|
||||||
|
|
||||||
/// Account bloom upgrade routine. If bloom already present, does nothing.
|
/// Account bloom upgrade routine. If bloom already present, does nothing.
|
||||||
|
@ -24,7 +24,9 @@ use transient_hashmap::TransientHashMap;
|
|||||||
use miner::{TransactionQueue, TransactionQueueDetailsProvider, TransactionImportResult, TransactionOrigin};
|
use miner::{TransactionQueue, TransactionQueueDetailsProvider, TransactionImportResult, TransactionOrigin};
|
||||||
use miner::transaction_queue::QueuingInstant;
|
use miner::transaction_queue::QueuingInstant;
|
||||||
use error::{Error, TransactionError};
|
use error::{Error, TransactionError};
|
||||||
use util::{U256, H256, Address};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
use hash::keccak;
|
use hash::keccak;
|
||||||
|
|
||||||
type Count = u16;
|
type Count = u16;
|
||||||
@ -218,7 +220,8 @@ mod tests {
|
|||||||
use error::{Error, TransactionError};
|
use error::{Error, TransactionError};
|
||||||
use client::TransactionImportResult;
|
use client::TransactionImportResult;
|
||||||
use miner::{TransactionQueue, TransactionOrigin};
|
use miner::{TransactionQueue, TransactionOrigin};
|
||||||
use util::{U256, Address};
|
use bigint::prelude::U256;
|
||||||
|
use util::Address;
|
||||||
use miner::transaction_queue::test::DummyTransactionDetailsProvider;
|
use miner::transaction_queue::test::DummyTransactionDetailsProvider;
|
||||||
|
|
||||||
fn queue() -> BanningTransactionQueue {
|
fn queue() -> BanningTransactionQueue {
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::{Instant, Duration};
|
use std::time::{Instant, Duration};
|
||||||
use util::{U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
|
||||||
/// External miner interface.
|
/// External miner interface.
|
||||||
@ -71,7 +72,8 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use std::thread::sleep;
|
use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use util::{H256, U256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
|
||||||
fn miner() -> ExternalMiner {
|
fn miner() -> ExternalMiner {
|
||||||
ExternalMiner::default()
|
ExternalMiner::default()
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
use linked_hash_map::LinkedHashMap;
|
use linked_hash_map::LinkedHashMap;
|
||||||
use transaction::{SignedTransaction, PendingTransaction};
|
use transaction::{SignedTransaction, PendingTransaction};
|
||||||
use error::TransactionError;
|
use error::TransactionError;
|
||||||
use util::{U256, H256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
|
||||||
/// Status of local transaction.
|
/// Status of local transaction.
|
||||||
/// Can indicate that the transaction is currently part of the queue (`Pending/Future`)
|
/// Can indicate that the transaction is currently part of the queue (`Pending/Future`)
|
||||||
@ -152,7 +153,7 @@ impl LocalTransactionsList {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use ethkey::{Random, Generator};
|
use ethkey::{Random, Generator};
|
||||||
use transaction::{Action, Transaction, SignedTransaction};
|
use transaction::{Action, Transaction, SignedTransaction};
|
||||||
use super::{LocalTransactionsList, Status};
|
use super::{LocalTransactionsList, Status};
|
||||||
|
@ -18,6 +18,8 @@ use std::time::{Instant, Duration};
|
|||||||
use std::collections::{BTreeMap, HashSet};
|
use std::collections::{BTreeMap, HashSet};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::{Mutex, RwLock};
|
use parking_lot::{Mutex, RwLock};
|
||||||
use util::*;
|
use util::*;
|
||||||
use timer::PerfTimer;
|
use timer::PerfTimer;
|
||||||
@ -1242,7 +1244,7 @@ mod tests {
|
|||||||
use super::super::{MinerService, PrioritizationStrategy};
|
use super::super::{MinerService, PrioritizationStrategy};
|
||||||
use super::*;
|
use super::*;
|
||||||
use block::IsBlock;
|
use block::IsBlock;
|
||||||
use util::U256;
|
use bigint::prelude::U256;
|
||||||
use ethkey::{Generator, Random};
|
use ethkey::{Generator, Random};
|
||||||
use client::{BlockChainClient, TestBlockChainClient, EachBlockWith, TransactionImportResult};
|
use client::{BlockChainClient, TestBlockChainClient, EachBlockWith, TransactionImportResult};
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
|
@ -61,7 +61,9 @@ pub use self::work_notify::NotifyWork;
|
|||||||
pub use self::stratum::{Stratum, Error as StratumError, Options as StratumOptions};
|
pub use self::stratum::{Stratum, Error as StratumError, Options as StratumOptions};
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use util::{H256, U256, Address, Bytes};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::{Address, Bytes};
|
||||||
use client::{MiningBlockChainClient};
|
use client::{MiningBlockChainClient};
|
||||||
use block::ClosedBlock;
|
use block::ClosedBlock;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
|
@ -20,8 +20,8 @@ use types::ids::BlockId;
|
|||||||
|
|
||||||
use futures::{future, Future};
|
use futures::{future, Future};
|
||||||
use native_contracts::ServiceTransactionChecker as Contract;
|
use native_contracts::ServiceTransactionChecker as Contract;
|
||||||
|
use bigint::prelude::U256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::U256;
|
|
||||||
|
|
||||||
const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker";
|
const SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME: &'static str = "service_transaction_checker";
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@ use std::sync::{Arc, Weak};
|
|||||||
use std::net::{SocketAddr, AddrParseError};
|
use std::net::{SocketAddr, AddrParseError};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use util::{H256, U256, H64, clean_0x};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::{H64, H256, clean_0x};
|
||||||
use ethereum::ethash::Ethash;
|
use ethereum::ethash::Ethash;
|
||||||
use ethash::SeedHashCompute;
|
use ethash::SeedHashCompute;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
|
@ -25,11 +25,13 @@
|
|||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! extern crate ethcore_util as util;
|
//! extern crate ethcore_util as util;
|
||||||
|
//! extern crate ethcore_bigint as bigint;
|
||||||
//! extern crate ethcore;
|
//! extern crate ethcore;
|
||||||
//! extern crate ethkey;
|
//! extern crate ethkey;
|
||||||
//! extern crate rustc_hex;
|
//! extern crate rustc_hex;
|
||||||
//!
|
//!
|
||||||
//! use util::{U256, Address};
|
//! use bigint::prelude::U256;
|
||||||
|
//! use util::Address;
|
||||||
//! use ethkey::{Random, Generator};
|
//! use ethkey::{Random, Generator};
|
||||||
//! use ethcore::miner::{TransactionQueue, RemovalReason, TransactionQueueDetailsProvider, AccountDetails, TransactionOrigin};
|
//! use ethcore::miner::{TransactionQueue, RemovalReason, TransactionQueueDetailsProvider, AccountDetails, TransactionOrigin};
|
||||||
//! use ethcore::transaction::*;
|
//! use ethcore::transaction::*;
|
||||||
@ -106,7 +108,9 @@ use std::cmp;
|
|||||||
use std::collections::{HashSet, HashMap, BTreeSet, BTreeMap};
|
use std::collections::{HashSet, HashMap, BTreeSet, BTreeMap};
|
||||||
use linked_hash_map::LinkedHashMap;
|
use linked_hash_map::LinkedHashMap;
|
||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use util::{Address, H256, U256};
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
|
use util::Address;
|
||||||
use table::Table;
|
use table::Table;
|
||||||
use transaction::*;
|
use transaction::*;
|
||||||
use error::{Error, TransactionError};
|
use error::{Error, TransactionError};
|
||||||
|
@ -24,8 +24,9 @@ use hyper::{Next};
|
|||||||
use hyper::net::HttpStream;
|
use hyper::net::HttpStream;
|
||||||
use ethash::SeedHashCompute;
|
use ethash::SeedHashCompute;
|
||||||
use hyper::Url;
|
use hyper::Url;
|
||||||
|
use bigint::prelude::U256;
|
||||||
|
use bigint::hash::H256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::*;
|
|
||||||
use ethereum::ethash::Ethash;
|
use ethereum::ethash::Ethash;
|
||||||
|
|
||||||
/// Trait for notifying about new mining work
|
/// Trait for notifying about new mining work
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user