Skip to content

Commit

Permalink
fix: copy_parents_data only needs base parents (#1660)
Browse files Browse the repository at this point in the history
[copy_parents_data_inner] only uses base parents, so there's no need to fetch
extension parents at the caller side.

[copy_parents_data_inner]: https://github.com/filecoin-project/rust-fil-proofs/blob/d409cbb33ba1f76e9a9271323f61aafe4a106cfc/storage-proofs-porep/src/stacked/vanilla/graph.rs#L224
  • Loading branch information
zhiqiangxu authored Apr 25, 2023
1 parent d409cbb commit b1779c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage-proofs-porep/src/stacked/vanilla/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ where
let cache_parents = cache.read(node)?;
Ok(self.copy_parents_data_inner(&cache_parents, base_data, hasher))
} else {
let mut cache_parents = [0u32; DEGREE];
let mut cache_parents = [0u32; BASE_DEGREE];

self.parents(node as usize, &mut cache_parents[..])
self.base_parents(node as usize, &mut cache_parents[..])
.expect("parents failure");
Ok(self.copy_parents_data_inner(&cache_parents, base_data, hasher))
}
Expand Down

0 comments on commit b1779c1

Please sign in to comment.