Tidy directory structure

This commit is contained in:
Paul Hauner
2022-08-18 16:26:55 +10:00
parent 516e4ee71a
commit 2873cb858c
2 changed files with 3 additions and 0 deletions

View File

@@ -503,6 +503,9 @@ async fn run<'a, T: EthSpec>(config: CreateConfig, spec: &ChainSpec) -> Result<(
Ok(())
}
/// Write some object to a file as JSON.
///
/// The file must be created new, it must not already exist.
fn write_to_json_file<P: AsRef<Path>, S: Serialize>(path: P, contents: &S) -> Result<(), String> {
eprintln!("Writing {:?}", path.as_ref());
let mut file = fs::OpenOptions::new()