diff --git a/crates/consensus/src/block.rs b/crates/consensus/src/block.rs index 2aece0da2d5..361350ee77d 100644 --- a/crates/consensus/src/block.rs +++ b/crates/consensus/src/block.rs @@ -23,7 +23,7 @@ pub struct Block { /// A response to `GetBlockBodies`, containing bodies if any bodies were found. /// /// Withdrawals can be optionally included at the end of the RLP encoded message. -#[derive(Debug, Clone, PartialEq, Eq, Default, RlpEncodable, RlpDecodable)] +#[derive(Debug, Clone, PartialEq, Eq, RlpEncodable, RlpDecodable)] #[rlp(trailing)] pub struct BlockBody { /// Transactions in this block. @@ -34,6 +34,12 @@ pub struct BlockBody { pub withdrawals: Option, } +impl Default for BlockBody { + fn default() -> Self { + Self { transactions: Vec::new(), ommers: Vec::new(), withdrawals: None } + } +} + /// We need to implement RLP traits manually because we currently don't have a way to flatten /// [`BlockBody`] into [`Block`]. mod block_rlp {