Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: make SealedBlock.header field private #13646

Merged
merged 12 commits into from
Jan 7, 2025
Merged
3 changes: 2 additions & 1 deletion crates/evm/execution-types/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use alloy_consensus::BlockHeader;
use alloy_eips::{eip1898::ForkBlock, eip2718::Encodable2718, BlockNumHash};
use alloy_primitives::{Address, BlockHash, BlockNumber, TxHash};
use core::{fmt, ops::RangeInclusive};
use std::ops::Deref;
use reth_execution_errors::{BlockExecutionError, InternalBlockExecutionError};
use reth_primitives::{
transaction::SignedTransactionIntoRecoveredExt, RecoveredTx, SealedBlockFor,
Expand Down Expand Up @@ -91,7 +92,7 @@ impl<N: NodePrimitives> Chain<N> {

/// Returns an iterator over all headers in the block with increasing block numbers.
pub fn headers(&self) -> impl Iterator<Item = SealedHeader<N::BlockHeader>> + '_ {
self.blocks.values().map(|block| block.header.clone())
self.blocks.values().map(|block| block.deref().clone())
}

/// Get cached trie updates for this chain.
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub struct SealedBlock<H = Header, B = BlockBody> {
/// Locked block header.
#[deref]
#[deref_mut]
pub header: SealedHeader<H>,
header: SealedHeader<H>,
/// Block body.
body: B,
}
Expand Down
Loading