Skip to content

Commit

Permalink
Simpify testing of api features (#1740)
Browse files Browse the repository at this point in the history
* feat: simpify testing of api features
* feat: rename aggregate_proofs to aggregate_seal_proofs
  • Loading branch information
cryptonemo committed Dec 5, 2023
1 parent 259c992 commit bcad63c
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 92 deletions.
21 changes: 21 additions & 0 deletions filecoin-proofs/src/types/porep_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ impl PoRepConfig {
}
}

pub fn new_groth16_with_features(
sector_size: u64,
porep_id: [u8; 32],
api_version: ApiVersion,
api_features: Vec<ApiFeature>,
) -> Self {
Self {
sector_size: SectorSize(sector_size),
partitions: PoRepProofPartitions(
*POREP_PARTITIONS
.read()
.expect("POREP_PARTITIONS poisoned")
.get(&sector_size)
.expect("unknown sector size"),
),
porep_id,
api_version,
api_features,
}
}

#[inline]
pub fn enable_feature(&mut self, feat: ApiFeature) {
if !self.feature_enabled(feat) {
Expand Down
Loading

0 comments on commit bcad63c

Please sign in to comment.