Skip to content

Commit

Permalink
chore(sdk): add adapters for header and body to NodeTypes (paradigm…
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane authored Nov 21, 2024
1 parent 3d477e7 commit c2323b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions crates/node/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,9 @@ where
{
type Engine = E;
}

/// Helper adapter type for accessing [`NodePrimitives::BlockHeader`] on [`NodeTypes`].
pub type HeaderTy<N> = <<N as NodeTypes>::Primitives as NodePrimitives>::BlockHeader;

/// Helper adapter type for accessing [`NodePrimitives::BlockBody`] on [`NodeTypes`].
pub type BodyTy<N> = <<N as NodeTypes>::Primitives as NodePrimitives>::BlockBody;

0 comments on commit c2323b4

Please sign in to comment.