From 1364e25468438226ef4783ab0a517d4e3003f9c4 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:47:39 +0200 Subject: [PATCH] chore: add BlockBody associated type helpers (#13451) --- crates/primitives-traits/src/block/body.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/primitives-traits/src/block/body.rs b/crates/primitives-traits/src/block/body.rs index 4546e85542..8c8804b593 100644 --- a/crates/primitives-traits/src/block/body.rs +++ b/crates/primitives-traits/src/block/body.rs @@ -98,3 +98,11 @@ pub trait BlockBody: self.encoded_2718_transactions_iter().map(Into::into).collect() } } + +/// This is a helper alias to make it easy to refer to the inner `Transaction` associated type of a +/// given type that implements [`BlockBody`]. +pub type BodyTx = ::Transaction; + +/// This is a helper alias to make it easy to refer to the inner `OmmerHeader` associated type of a +/// given type that implements [`BlockBody`]. +pub type BodyOmmer = ::OmmerHeader;