diff --git a/Cargo.lock b/Cargo.lock index 478d38713c89..3c1b2b70f884 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7826,7 +7826,6 @@ dependencies = [ "auto_impl", "bitflags 2.5.0", "criterion", - "fnv", "futures-util", "itertools 0.12.1", "metrics", @@ -7844,6 +7843,7 @@ dependencies = [ "reth-tasks", "reth-tracing", "revm", + "rustc-hash", "schnellru", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 478c2b4536cb..e66aa341314e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -321,6 +321,7 @@ serde_with = "3.3.0" humantime = "2.1" humantime-serde = "1.1" rand = "0.8.5" +rustc-hash = "1.1.0" schnellru = "0.2" strum = "0.26" rayon = "1.7" diff --git a/crates/storage/db/Cargo.toml b/crates/storage/db/Cargo.toml index 461a84f3e89a..f816cc2c0bfa 100644 --- a/crates/storage/db/Cargo.toml +++ b/crates/storage/db/Cargo.toml @@ -37,7 +37,7 @@ tempfile = { workspace = true, optional = true } derive_more.workspace = true eyre.workspace = true paste.workspace = true -rustc-hash = "1.1.0" +rustc-hash.workspace = true # arbitrary utils arbitrary = { workspace = true, features = ["derive"], optional = true } diff --git a/crates/transaction-pool/Cargo.toml b/crates/transaction-pool/Cargo.toml index 4365245cf79f..ebb6e497f9aa 100644 --- a/crates/transaction-pool/Cargo.toml +++ b/crates/transaction-pool/Cargo.toml @@ -36,9 +36,9 @@ metrics.workspace = true aquamarine.workspace = true thiserror.workspace = true tracing.workspace = true +rustc-hash.workspace = true schnellru.workspace = true serde = { workspace = true, features = ["derive", "rc"], optional = true } -fnv = "1.0.7" bitflags.workspace = true auto_impl.workspace = true smallvec.workspace = true diff --git a/crates/transaction-pool/src/identifier.rs b/crates/transaction-pool/src/identifier.rs index 6ec1527bd140..4e4bec4d1b1b 100644 --- a/crates/transaction-pool/src/identifier.rs +++ b/crates/transaction-pool/src/identifier.rs @@ -1,5 +1,5 @@ -use fnv::FnvHashMap; use reth_primitives::Address; +use rustc_hash::FxHashMap; use std::collections::HashMap; /// An internal mapping of addresses. @@ -13,7 +13,7 @@ pub(crate) struct SenderIdentifiers { /// Assigned `SenderId` for an `Address`. address_to_id: HashMap
, /// Reverse mapping of `SenderId` to `Address`. - sender_to_address: FnvHashMap