Skip to content

Commit

Permalink
fix: apply review feedback
Browse files Browse the repository at this point in the history
style: rust fmt
  • Loading branch information
cryptonemo committed Oct 25, 2021
1 parent 8bc0cd3 commit 6be136a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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
8 changes: 4 additions & 4 deletions filecoin-proofs/src/api/window_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ pub fn generate_single_window_post_with_vanilla<Tree: 'static + MerkleTreeTrait>
let prover_id_safe: <Tree::Hasher as Hasher>::Domain =
as_safe_commitment(&prover_id, "prover_id")?;

let vanilla_params = window_post_setup_params(&post_config);
let partitions = get_partitions_for_window_post(vanilla_proofs.len(), &post_config);
let vanilla_params = window_post_setup_params(post_config);
let partitions = get_partitions_for_window_post(vanilla_proofs.len(), post_config);

let setup_params = compound_proof::SetupParams {
vanilla_params,
Expand All @@ -276,7 +276,7 @@ pub fn generate_single_window_post_with_vanilla<Tree: 'static + MerkleTreeTrait>

let pub_params: compound_proof::PublicParams<'_, FallbackPoSt<'_, Tree>> =
FallbackPoStCompound::setup(&setup_params)?;
let groth_params = get_post_params::<Tree>(&post_config)?;
let groth_params = get_post_params::<Tree>(post_config)?;

let mut pub_sectors = Vec::with_capacity(vanilla_proofs.len());
for vanilla_proof in &vanilla_proofs {
Expand All @@ -294,7 +294,7 @@ pub fn generate_single_window_post_with_vanilla<Tree: 'static + MerkleTreeTrait>
};

let partitioned_proofs = single_partition_vanilla_proofs(
&post_config,
post_config,
&pub_params.vanilla_params,
&pub_inputs,
&vanilla_proofs,
Expand Down

0 comments on commit 6be136a

Please sign in to comment.