mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
primitives: use alloy MAINNET_GENESIS_HASH constant (#11848)
This commit is contained in:
@ -36,6 +36,7 @@ auto_impl.workspace = true
|
||||
[dev-dependencies]
|
||||
arbitrary = { workspace = true, features = ["derive"] }
|
||||
proptest.workspace = true
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std", "serde", "rustc-hash"]
|
||||
|
||||
@ -446,15 +446,12 @@ impl Cache {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::b256;
|
||||
|
||||
const GENESIS_HASH: B256 =
|
||||
b256!("d4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3");
|
||||
use alloy_consensus::constants::MAINNET_GENESIS_HASH;
|
||||
|
||||
// EIP test vectors.
|
||||
#[test]
|
||||
fn forkhash() {
|
||||
let mut fork_hash = ForkHash::from(GENESIS_HASH);
|
||||
let mut fork_hash = ForkHash::from(MAINNET_GENESIS_HASH);
|
||||
assert_eq!(fork_hash.0, hex!("fc64ec04"));
|
||||
|
||||
fork_hash += 1_150_000u64;
|
||||
@ -468,7 +465,7 @@ mod tests {
|
||||
fn compatibility_check() {
|
||||
let mut filter = ForkFilter::new(
|
||||
Head { number: 0, ..Default::default() },
|
||||
GENESIS_HASH,
|
||||
MAINNET_GENESIS_HASH,
|
||||
0,
|
||||
vec![
|
||||
ForkFilterKey::Block(1_150_000),
|
||||
@ -727,7 +724,7 @@ mod tests {
|
||||
|
||||
let mut fork_filter = ForkFilter::new(
|
||||
Head { number: 0, ..Default::default() },
|
||||
GENESIS_HASH,
|
||||
MAINNET_GENESIS_HASH,
|
||||
0,
|
||||
vec![ForkFilterKey::Block(b1), ForkFilterKey::Block(b2)],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user