mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
chore: remove reth-codec dependency from ethereum-forks crate (#6055)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -6121,7 +6121,6 @@ dependencies = [
|
||||
"proptest",
|
||||
"proptest-derive",
|
||||
"rand 0.8.5",
|
||||
"reth-codecs",
|
||||
"serde",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
@@ -12,9 +12,6 @@ description = "Ethereum fork types used in reth."
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-codecs.workspace = true
|
||||
|
||||
# ethereum
|
||||
alloy-chains.workspace = true
|
||||
alloy-primitives = { workspace = true, features = ["rand", "rlp"] }
|
||||
@@ -42,4 +39,4 @@ proptest-derive.workspace = true
|
||||
|
||||
[features]
|
||||
arbitrary = ["dep:arbitrary", "dep:proptest", "dep:proptest-derive"]
|
||||
optimism = ["reth-codecs/optimism"]
|
||||
optimism = []
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
use crate::Head;
|
||||
use alloy_primitives::{hex, BlockNumber, B256};
|
||||
use alloy_rlp::*;
|
||||
#[cfg(any(test, feature = "arbitrary"))]
|
||||
use arbitrary::Arbitrary;
|
||||
use crc::*;
|
||||
use reth_codecs::derive_arbitrary;
|
||||
#[cfg(any(test, feature = "arbitrary"))]
|
||||
use proptest_derive::Arbitrary as PropTestArbitrary;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
@@ -19,7 +22,7 @@ use thiserror::Error;
|
||||
const CRC_32_IEEE: Crc<u32> = Crc::<u32>::new(&CRC_32_ISO_HDLC);
|
||||
|
||||
/// `CRC32` hash of all previous forks starting from genesis block.
|
||||
#[derive_arbitrary(rlp)]
|
||||
#[cfg_attr(any(test, feature = "arbitrary"), derive(PropTestArbitrary, Arbitrary))]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
@@ -108,7 +111,7 @@ impl From<ForkFilterKey> for u64 {
|
||||
|
||||
/// A fork identifier as defined by EIP-2124.
|
||||
/// Serves as the chain compatibility identifier.
|
||||
#[derive_arbitrary(rlp)]
|
||||
#[cfg_attr(any(test, feature = "arbitrary"), derive(PropTestArbitrary, Arbitrary))]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
|
||||
Reference in New Issue
Block a user