From cac065589d8a766940292ea338d5885db2f44fd0 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Thu, 14 Nov 2024 17:58:09 +0100 Subject: [PATCH] Inline Body impl for Block types --- crates/primitives-traits/src/block/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/primitives-traits/src/block/mod.rs b/crates/primitives-traits/src/block/mod.rs index ab170ca76236..f19207930ea1 100644 --- a/crates/primitives-traits/src/block/mod.rs +++ b/crates/primitives-traits/src/block/mod.rs @@ -57,42 +57,52 @@ impl Body::Transaction, ::Withdrawals> for T { + #[inline] fn transactions(&self) -> &[::Transaction] { self.body().transactions() } + #[inline] fn withdrawals(&self) -> Option<&::Withdrawals> { self.body().withdrawals() } + #[inline] fn ommers(&self) -> &[T::Header] { self.body().ommers() } + #[inline] fn requests(&self) -> Option<&Requests> { self.body().requests() } + #[inline] fn calculate_tx_root(&self) -> B256 { self.body().calculate_tx_root() } + #[inline] fn calculate_ommers_root(&self) -> B256 { self.body().calculate_ommers_root() } + #[inline] fn calculate_withdrawals_root(&self) -> Option { self.body().calculate_withdrawals_root() } + #[inline] fn recover_signers(&self) -> Option> { self.body().recover_signers() } + #[inline] fn blob_versioned_hashes(&self) -> Vec<&B256> { self.body().blob_versioned_hashes() } + #[inline] fn blob_versioned_hashes_copied(&self) -> Vec { self.body().blob_versioned_hashes_copied() }