Skip to content

Commit

Permalink
Implement From<Block> for BlockBody (#7643)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger authored Apr 14, 2024
1 parent cfbebc1 commit a265465
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,12 @@ impl BlockBody {
}
}

impl From<Block> for BlockBody {
fn from(block: Block) -> Self {
Self { transactions: block.body, ommers: block.ommers, withdrawals: block.withdrawals }
}
}

#[cfg(test)]
mod tests {
use super::{BlockNumberOrTag::*, *};
Expand Down

0 comments on commit a265465

Please sign in to comment.