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

Commit e2095d4

Browse files
dvdplmdebris
authored andcommitted
Move ethereum-specific H256FastMap type to own crate (#9307)
* Add a `fastmap` crate that provides the H256FastMap specialized HashMap * Use `fastmap` instead of `plain_hasher` * Update submodules for Reasons™ * Submodule update
1 parent 78a38e9 commit e2095d4

File tree

15 files changed

+72
-14
lines changed

15 files changed

+72
-14
lines changed

Cargo.lock

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ members = [
136136
"util/triehash-ethereum",
137137
"util/keccak-hasher",
138138
"util/patricia-trie-ethereum",
139+
"util/fastmap",
139140
]
140141

141142
[patch.crates-io]

ethcore/light/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ethcore-io = { path = "../../util/io" }
2020
hashdb = { git = "https://github.com/paritytech/parity-common" }
2121
heapsize = "0.4"
2222
vm = { path = "../vm" }
23-
plain_hasher = { git = "https://github.com/paritytech/parity-common" }
23+
fastmap = { path = "../../util/fastmap" }
2424
rlp = { git = "https://github.com/paritytech/parity-common" }
2525
rlp_derive = { path = "../../util/rlp_derive" }
2626
smallvec = "0.4"

ethcore/light/src/client/header_chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use ethereum_types::{H256, H264, U256};
4141
use heapsize::HeapSizeOf;
4242
use kvdb::{DBTransaction, KeyValueDB};
4343
use parking_lot::{Mutex, RwLock};
44-
use plain_hasher::H256FastMap;
44+
use fastmap::H256FastMap;
4545
use rlp::{Encodable, Decodable, DecoderError, RlpStream, Rlp};
4646
use smallvec::SmallVec;
4747

ethcore/light/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extern crate keccak_hasher;
6868
extern crate memorydb;
6969
extern crate patricia_trie as trie;
7070
extern crate patricia_trie_ethereum as ethtrie;
71-
extern crate plain_hasher;
71+
extern crate fastmap;
7272
extern crate rand;
7373
extern crate rlp;
7474
extern crate parking_lot;

ethcore/light/src/transaction_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::collections::hash_map::Entry;
2929

3030
use transaction::{self, Condition, PendingTransaction, SignedTransaction};
3131
use ethereum_types::{H256, U256, Address};
32-
use plain_hasher::H256FastMap;
32+
use fastmap::H256FastMap;
3333

3434
// Knowledge of an account's current nonce.
3535
#[derive(Debug, Clone, PartialEq, Eq)]

ethcore/sync/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ethcore-transaction = { path = "../transaction" }
1717
ethcore = { path = ".." }
1818
ethereum-types = "0.3"
1919
hashdb = { git = "https://github.com/paritytech/parity-common" }
20-
plain_hasher = { git = "https://github.com/paritytech/parity-common" }
20+
fastmap = { path = "../../util/fastmap" }
2121
rlp = { git = "https://github.com/paritytech/parity-common" }
2222
rustc-hex = "1.0"
2323
keccak-hash = { git = "https://github.com/paritytech/parity-common" }

ethcore/sync/src/chain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ use std::time::{Duration, Instant};
9999
use hash::keccak;
100100
use heapsize::HeapSizeOf;
101101
use ethereum_types::{H256, U256};
102-
use plain_hasher::H256FastMap;
102+
use fastmap::H256FastMap;
103103
use parking_lot::RwLock;
104104
use bytes::Bytes;
105105
use rlp::{Rlp, RlpStream, DecoderError};

ethcore/sync/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern crate ethcore;
3131
extern crate ethereum_types;
3232
extern crate env_logger;
3333
extern crate hashdb;
34-
extern crate plain_hasher;
34+
extern crate fastmap;
3535
extern crate rand;
3636
extern crate semver;
3737
extern crate parking_lot;

ethcore/sync/src/transactions_stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use api::TransactionStats;
1818
use std::collections::{HashSet, HashMap};
1919
use ethereum_types::{H256, H512};
20-
use plain_hasher::H256FastMap;
20+
use fastmap::H256FastMap;
2121

2222
type NodeId = H512;
2323
type BlockNumber = u64;

0 commit comments

Comments
 (0)