diff --git a/filecoin-proofs/tests/api.rs b/filecoin-proofs/tests/api.rs index 417aacbce..0661bd730 100644 --- a/filecoin-proofs/tests/api.rs +++ b/filecoin-proofs/tests/api.rs @@ -943,10 +943,16 @@ fn aggregate_seal_proofs( let mut prover_id = [0u8; 32]; prover_id.copy_from_slice(AsRef::<[u8]>::as_ref(&prover_fr)); - let aggregate_versions = vec![ - groth16::aggregate::AggregateVersion::V1, - groth16::aggregate::AggregateVersion::V2, - ]; + // Note that ApiVersion 1.2.0 only supports SnarkPack v2, so only + // allow that testing here. + let aggregate_versions = match porep_config.api_version { + ApiVersion::V1_2_0 => vec![groth16::aggregate::AggregateVersion::V2], + ApiVersion::V1_1_0 => vec![ + groth16::aggregate::AggregateVersion::V1, + groth16::aggregate::AggregateVersion::V2, + ], + ApiVersion::V1_0_0 => vec![groth16::aggregate::AggregateVersion::V1], + }; info!( "Aggregating {} seal proof with ApiVersion {}, Features {:?}, and PoRep ID {:?}", num_proofs_to_aggregate, diff --git a/storage-proofs-porep/tests/common.rs b/storage-proofs-porep/tests/common.rs index 94e04d9c6..eb37f7948 100644 --- a/storage-proofs-porep/tests/common.rs +++ b/storage-proofs-porep/tests/common.rs @@ -13,7 +13,9 @@ use storage_proofs_porep::stacked::{PersistentAux, PublicParams, StackedDrg, Tau // This method should ONLY be used in purposed test code. #[allow(dead_code)] -pub fn remove_replica_and_tree_r(cache_path: &Path) -> Result<()> { +pub(crate) fn remove_replica_and_tree_r( + cache_path: &Path, +) -> Result<()> { let replica_path = cache_path.join("replica-path"); let tree_r_last_config = StoreConfig { path: cache_path.to_path_buf(),