DirtyAuthenticatedBitMap

Type Alias DirtyAuthenticatedBitMap 

Source
pub type DirtyAuthenticatedBitMap<D, const N: usize> = BitMap<D, N, Dirty>;
Expand description

A bitmap in the dirty state (has pending updates not yet reflected in the root).

Aliased Type§

pub struct DirtyAuthenticatedBitMap<D, const N: usize> { /* private fields */ }

Implementations§

Source§

impl<D: Digest, const N: usize> DirtyBitMap<D, N>

Source

pub fn push(&mut self, bit: bool)

Add a single bit to the end of the bitmap.

§Warning

The update will not affect the root until merkleize is called.

Source

pub fn set_bit(&mut self, bit: u64, value: bool)

Set the value of the given bit.

§Warning

The update will not impact the root until merkleize is called.

Source

pub fn dirty_chunks(&self) -> Vec<Location>

The chunks that have been modified or added since the last call to merkleize.

Source

pub async fn merkleize( self, hasher: &mut impl Hasher<D>, ) -> Result<CleanBitMap<D, N>, Error>

Merkleize all updates not yet reflected in the bitmap’s root.