diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index cf092caa6..1a991ef7b 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -15,7 +15,7 @@ reth-codecs = { version = "0.1.0", path = "../codecs" } # ethereum ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false } parity-scale-codec = { version = "3.2.1", features = ["derive", "bytes"] } -tiny-keccak = { version = "2.0", features = ["sha3"] } +tiny-keccak = { version = "2.0", features = ["keccak"] } #used for forkid crc = "1" diff --git a/crates/primitives/src/lib.rs b/crates/primitives/src/lib.rs index 818812eb2..d23326299 100644 --- a/crates/primitives/src/lib.rs +++ b/crates/primitives/src/lib.rs @@ -68,10 +68,10 @@ pub use __reexport::*; /// Returns the keccak256 hash for the given data. pub fn keccak256(data: impl AsRef<[u8]>) -> H256 { - use tiny_keccak::{Hasher, Sha3}; - let mut sha3 = Sha3::v256(); + use tiny_keccak::{Hasher, Keccak}; + let mut keccak = Keccak::v256(); let mut output = [0; 32]; - sha3.update(data.as_ref()); - sha3.finalize(&mut output); + keccak.update(data.as_ref()); + keccak.finalize(&mut output); output.into() }