chore: make SealedBlock.header field private (#13646)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
DevOrbitlabs
2025-01-08 02:44:39 +07:00
committed by GitHub
parent 3e980e61d8
commit 35392bd8e9
30 changed files with 169 additions and 161 deletions

View File

@ -91,7 +91,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.sealed_header().clone())
}
/// Get cached trie updates for this chain.
@ -858,8 +858,8 @@ mod tests {
let mut block2 = block;
// Set the hashes of block1 and block2
block1.block.header.set_hash(block1_hash);
block2.block.header.set_hash(block2_hash);
block1.block.set_hash(block1_hash);
block2.block.set_hash(block2_hash);
// Create a random receipt object, receipt1
let receipt1 = Receipt {