mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: make SealedBlock.header field private (#13646)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user