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 { diff --git a/crates/eips/src/eip1559/constants.rs b/crates/eips/src/eip1559/constants.rs index 80837888668..8fb3355acd7 100644 --- a/crates/eips/src/eip1559/constants.rs +++ b/crates/eips/src/eip1559/constants.rs @@ -51,3 +51,13 @@ pub(crate) const OP_MAINNET_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 6; /// Base fee max change denominator for Base Sepolia as defined in the Optimism /// [transaction costs](https://community.optimism.io/docs/developers/build/differences/#transaction-costs) doc. pub(crate) const BASE_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 10; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn min_protocol_sanity() { + assert_eq!(MIN_PROTOCOL_BASE_FEE_U256.to::(), MIN_PROTOCOL_BASE_FEE); + } +}