Skip to content

Commit

Permalink
feat: phase2 split-keys: write info file
Browse files Browse the repository at this point in the history
Write a file for each parameter which contains the path to the input
file. This can be used to verify that the files were split correctly.
  • Loading branch information
vmx committed Aug 5, 2020
1 parent 9d1617b commit 0f6f28f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions filecoin-proofs/src/bin/phase2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,16 @@ fn main() {
|_| panic!("failed to write meta information to {}", meta_path),
);
}

// The info file contains the filename the parameter was created of.
{
let info_path = format!("v{}-{}.info", parameter_cache::VERSION, &identifier);
println!("writing info to file: {}", info_path);
let mut info_file = File::create(&info_path)
.unwrap_or_else(|_| panic!("failed to create {}", info_path));
writeln!(&mut info_file, "{}", input_path)
.unwrap_or_else(|_| panic!("failed to write info data to {}", info_path));
}
}
_ => unreachable!(),
}
Expand Down

0 comments on commit 0f6f28f

Please sign in to comment.