Implement From<Block> for BlockBody (#7643)

This commit is contained in:
Thomas Coratger
2024-04-14 23:01:49 +02:00
committed by GitHub
parent cfbebc1595
commit a2654650ba

View File

@ -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::*, *};