Skip to content

Commit 91e275a

Browse files
committed
feat: make regression record table const
1 parent 9c6133f commit 91e275a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

filecoin-proofs/tests/regression.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ use storage_proofs_core::sector::SectorId;
2323
const V16_SEAL_REGRESSION_RECORDS: &str = "seal_regression_records-v16.json";
2424
const V18_SEAL_REGRESSION_RECORDS: &str = "seal_regression_records-v18.json";
2525

26+
const SEAL_REGRESSION_RECORD_VERSIONS: [(&str, &str); 2] = [
27+
(V16_SEAL_REGRESSION_RECORDS, "v16"),
28+
(V18_SEAL_REGRESSION_RECORDS, "v18"),
29+
];
30+
2631
#[derive(Debug, Clone, Serialize, Deserialize)]
2732
pub(crate) struct SealRegressionRecord {
2833
pub porep_config: PoRepConfig,
@@ -237,12 +242,8 @@ fn run_seal_regression_tests() -> Result<()> {
237242
fil_logger::maybe_init();
238243

239244
let basedir = Path::new(&std::env::var("CARGO_MANIFEST_DIR")?).join("tests");
240-
let seal_regression_record_versions = vec![
241-
(V16_SEAL_REGRESSION_RECORDS, "v16"),
242-
(V18_SEAL_REGRESSION_RECORDS, "v18"),
243-
];
244245

245-
for (path, version) in seal_regression_record_versions {
246+
for (path, version) in SEAL_REGRESSION_RECORD_VERSIONS {
246247
let path = basedir.join(path);
247248
info!("Loading regression records from {:?}", path);
248249
let records = load_regression_records(&path)?;

0 commit comments

Comments
 (0)