#[repr(C)]struct HashedDiskHeader {
header: DiskBlockHeader,
hash: BlockHash,
acc_pos: u32,
acc_len: u32,
}Expand description
To avoid having to sha256 headers every time we retrieve them, we store the hash along with the header, so we just need to compare the hash to know if we have the right header
Fields§
§header: DiskBlockHeaderThe actual header with contextually relevant information
hash: BlockHashThe hash of the header
acc_pos: u32Where in the accumulator file this block’s accumulator is
acc_len: u32The length of the block’s accumulator
Trait Implementations§
Source§impl Clone for HashedDiskHeader
impl Clone for HashedDiskHeader
Source§fn clone(&self) -> HashedDiskHeader
fn clone(&self) -> HashedDiskHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashedDiskHeader
impl Debug for HashedDiskHeader
impl Copy for HashedDiskHeader
Auto Trait Implementations§
impl Freeze for HashedDiskHeader
impl RefUnwindSafe for HashedDiskHeader
impl Send for HashedDiskHeader
impl Sync for HashedDiskHeader
impl Unpin for HashedDiskHeader
impl UnwindSafe for HashedDiskHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more