Skip to content

Commit

Permalink
fix: apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptonemo committed Oct 25, 2021
1 parent 8bc0cd3 commit b8529ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filecoin-proofs/src/api/post_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ pub fn single_partition_vanilla_proofs<Tree: MerkleTreeTrait>(
info!("single_partition_vanilla_proofs:finish");

ensure!(
FallbackPoSt::<Tree>::verify(pub_params, pub_inputs, &partition_proof,)?,
FallbackPoSt::<Tree>::verify(pub_params, pub_inputs, &partition_proof)?,
"partitioned vanilla proofs failed to verify"
);

Expand All @@ -384,7 +384,7 @@ pub fn merge_window_post_partition_proofs(
pub fn get_num_partition_for_fallback_post(config: &PoStConfig, num_sectors: usize) -> usize {
match config.typ {
PoStType::Window => {
let partitions = ((num_sectors) as f32 / config.sector_count as f32).ceil() as usize;
let partitions = (num_sectors as f32 / config.sector_count as f32).ceil() as usize;
if partitions > 1 {
partitions
} else {
Expand Down
1 change: 1 addition & 0 deletions filecoin-proofs/src/api/window_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ pub fn generate_single_window_post_with_vanilla<Tree: 'static + MerkleTreeTrait>

let vanilla_params = window_post_setup_params(&post_config);
let partitions = get_partitions_for_window_post(vanilla_proofs.len(), &post_config);
ensure!(partition_index < partitions.unwrap_or(1), "Invalid partition index specified");

let setup_params = compound_proof::SetupParams {
vanilla_params,
Expand Down

0 comments on commit b8529ce

Please sign in to comment.