Skip to content

Commit

Permalink
fix(storage-proofs-porep): actually clear base_parents_missing
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Sep 7, 2021
1 parent 07da591 commit 29ee4f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ fn fill_buffer(

if cur_node > MIN_BASE_PARENT_NODE {
// Mark base parent predrecessor as missing
base_parent_missing.clear();
base_parent_missing.set(predecessor_index);

// Skip the last base parent - it always points to the preceding node,
Expand Down
5 changes: 5 additions & 0 deletions storage-proofs-porep/src/stacked/vanilla/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ impl BitMask {
pub fn get(self, i: usize) -> bool {
self.0 & (1 << i) != 0
}

#[inline]
pub fn clear(&mut self) {
self.0 = 0;
}
}

#[derive(Debug)]
Expand Down

0 comments on commit 29ee4f7

Please sign in to comment.