dissolve util (#7460)

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor finished

* removed obsolete util/src/lib.rs

* removed commented out code
This commit is contained in:
Marek Kotewicz
2018-01-10 13:35:18 +01:00
committed by Svyatoslav Nikolsky
parent 4a4d64be56
commit e95b093483
395 changed files with 744 additions and 1913 deletions

View File

@@ -14,8 +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 bigint::prelude::U256;
use bigint::hash::H256;
use ethereum_types::{H256, U256};
use bytes::Bytes;
use header::BlockNumber;

View File

@@ -14,8 +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 bigint::prelude::U256;
use bigint::hash::H256;
use ethereum_types::{H256, U256};
use header::BlockNumber;
/// Brief info about inserted block.

View File

@@ -22,8 +22,7 @@ use std::mem;
use itertools::Itertools;
use bloomchain as bc;
use heapsize::HeapSizeOf;
use bigint::prelude::U256;
use bigint::hash::{H256, H2048};
use ethereum_types::{H256, H2048, U256};
use parking_lot::{Mutex, RwLock};
use bytes::Bytes;
use rlp::*;
@@ -634,7 +633,7 @@ impl BlockChain {
return None;
}
if let Some(extras) = self.db.read(db::COL_EXTRA, &best_block_hash) as Option<BlockDetails> {
type DetailsKey = Key<BlockDetails, Target=::bigint::hash::H264>;
type DetailsKey = Key<BlockDetails, Target=::ethereum_types::H264>;
batch.delete(db::COL_EXTRA, &(DetailsKey::key(&best_block_hash)));
let hash = extras.parent;
let range = extras.number as bc::Number .. extras.number as bc::Number;
@@ -1479,7 +1478,7 @@ mod tests {
use hash::keccak;
use kvdb::KeyValueDB;
use kvdb_memorydb;
use bigint::hash::*;
use ethereum_types::*;
use receipt::{Receipt, TransactionOutcome};
use blockchain::{BlockProvider, BlockChain, Config, ImportRoute};
use tests::helpers::*;

View File

@@ -26,8 +26,7 @@ use header::BlockNumber;
use receipt::Receipt;
use heapsize::HeapSizeOf;
use bigint::prelude::U256;
use bigint::hash::{H256, H264};
use ethereum_types::{H256, H264, U256};
use kvdb::PREFIX_LEN as DB_PREFIX_LEN;
/// Represents index of extra data in database

View File

@@ -15,7 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
use rlp::*;
use bigint::hash::{H256, H2048};
use ethereum_types::{H256, H2048};
use bytes::Bytes;
use header::Header;
use transaction::SignedTransaction;

View File

@@ -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 bigint::hash::H2048;
use ethereum_types::H2048;
pub trait WithBloom {
fn with_bloom(self, bloom: H2048) -> Self where Self: Sized;

View File

@@ -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 bigint::hash::H256;
use ethereum_types::H256;
use bytes::Bytes;
use views::BlockView;

View File

@@ -14,8 +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 bigint::prelude::U256;
use bigint::hash::H2048;
use ethereum_types::{H2048, U256};
use bytes::Bytes;
use header::BlockNumber;
use transaction::SignedTransaction;
@@ -112,7 +111,7 @@ impl Iterator for ChainGenerator {
}
mod tests {
use bigint::hash::{H256, H2048};
use ethereum_types::{H256, H2048};
use views::BlockView;
use blockchain::generator::{ChainIterator, ChainGenerator, BlockFinalizer};

View File

@@ -16,7 +16,7 @@
//! Import route.
use bigint::hash::H256;
use ethereum_types::H256;
use blockchain::block_info::{BlockInfo, BlockLocation};
/// Import route for newly inserted block.
@@ -67,8 +67,7 @@ impl From<BlockInfo> for ImportRoute {
#[cfg(test)]
mod tests {
use bigint::prelude::U256;
use bigint::hash::H256;
use ethereum_types::{H256, U256};
use blockchain::block_info::{BlockInfo, BlockLocation, BranchBecomingCanonChainData};
use blockchain::ImportRoute;

View File

@@ -1,5 +1,5 @@
use std::collections::HashMap;
use bigint::hash::H256;
use ethereum_types::H256;
use header::BlockNumber;
use blockchain::block_info::BlockInfo;
use blooms::BloomGroup;