pub struct LeafSet { /* private fields */ }Expand description
Compact (roaring) bitmap representing the set of positions of leaves that are currently unpruned in the MMR.
Implementations§
Source§impl LeafSet
impl LeafSet
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<LeafSet>
pub fn open<P: AsRef<Path>>(path: P) -> Result<LeafSet>
Open the remove log file. The content of the file will be read in memory for fast checking.
Sourcepub fn copy_snapshot<P: AsRef<Path>>(path: P, cp_path: P) -> Result<()>
pub fn copy_snapshot<P: AsRef<Path>>(path: P, cp_path: P) -> Result<()>
Copies a snapshot of the utxo file into the primary utxo file.
Sourcepub fn removed_pre_cutoff(
&self,
cutoff_pos: u64,
rewind_rm_pos: &Bitmap,
prune_list: &PruneList,
) -> Bitmap
pub fn removed_pre_cutoff( &self, cutoff_pos: u64, rewind_rm_pos: &Bitmap, prune_list: &PruneList, ) -> Bitmap
Calculate the set of pruned positions up to and including the cutoff_pos. Uses both the leaf_set and the prune_list to determine prunedness.
Auto Trait Implementations§
impl Freeze for LeafSet
impl RefUnwindSafe for LeafSet
impl Send for LeafSet
impl Sync for LeafSet
impl Unpin for LeafSet
impl UnwindSafe for LeafSet
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