From b92fe2a6d7e0ecce1e4f61e841b4edf127765153 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Sun, 17 Nov 2024 16:48:53 +0100 Subject: [PATCH] Add blanket impl of Transaction and BlockHeader references --- crates/consensus/src/block/header.rs | 1 + crates/consensus/src/transaction/mod.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/consensus/src/block/header.rs b/crates/consensus/src/block/header.rs index e2d4565b63a..9b2148be8d1 100644 --- a/crates/consensus/src/block/header.rs +++ b/crates/consensus/src/block/header.rs @@ -560,6 +560,7 @@ impl<'a> arbitrary::Arbitrary<'a> for Header { } /// Trait for extracting specific Ethereum block data from a header +#[auto_impl::auto_impl(&, Arc)] pub trait BlockHeader { /// Retrieves the parent hash of the block fn parent_hash(&self) -> B256; diff --git a/crates/consensus/src/transaction/mod.rs b/crates/consensus/src/transaction/mod.rs index 18159c56542..7bf13c4d006 100644 --- a/crates/consensus/src/transaction/mod.rs +++ b/crates/consensus/src/transaction/mod.rs @@ -53,6 +53,7 @@ pub mod serde_bincode_compat { /// Represents a minimal EVM transaction. #[doc(alias = "Tx")] +#[auto_impl::auto_impl(&, Arc)] pub trait Transaction: fmt::Debug + any::Any + Send + Sync + 'static { /// Get `chain_id`. fn chain_id(&self) -> Option;