Skip to content

Commit

Permalink
consensus: use Withdrawals wrapper in BlockBody (#1525)
Browse files Browse the repository at this point in the history
consensus: use Withdrawals wrapper in BlockBody
  • Loading branch information
tcoratger authored Oct 19, 2024
1 parent a1a191c commit 8729a58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/consensus/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::Header;
use alloc::vec::Vec;
use alloy_eips::eip4895::Withdrawal;
use alloy_eips::eip4895::Withdrawals;
use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};

/// Ethereum full block.
Expand Down Expand Up @@ -31,7 +31,7 @@ pub struct BlockBody<T> {
/// Ommers/uncles header.
pub ommers: Vec<Header>,
/// Block withdrawals.
pub withdrawals: Option<Vec<Withdrawal>>,
pub withdrawals: Option<Withdrawals>,
}

/// We need to implement RLP traits manually because we currently don't have a way to flatten
Expand All @@ -45,7 +45,7 @@ mod block_rlp {
header: Header,
transactions: Vec<T>,
ommers: Vec<Header>,
withdrawals: Option<Vec<Withdrawal>>,
withdrawals: Option<Withdrawals>,
}

#[derive(RlpEncodable)]
Expand All @@ -54,7 +54,7 @@ mod block_rlp {
header: &'a Header,
transactions: &'a Vec<T>,
ommers: &'a Vec<Header>,
withdrawals: Option<&'a Vec<Withdrawal>>,
withdrawals: Option<&'a Withdrawals>,
}

impl<'a, T> From<&'a Block<T>> for HelperRef<'a, T> {
Expand Down

0 comments on commit 8729a58

Please sign in to comment.