fn genesis_yaml<T: EthSpec>(validator_count: usize, genesis_time: u64, output: PathBuf) {
    let spec = &T::default_spec();

    let builder: TestingBeaconStateBuilder<T> =
        TestingBeaconStateBuilder::from_deterministic_keypairs(validator_count, spec);

    let (mut state, _keypairs) = builder.build();
    state.genesis_time = genesis_time;

    info!("Generated state root: {:?}", state.canonical_root());

    info!("Writing genesis state to {:?}", output);

    let file = File::create(output.clone())
        .unwrap_or_else(|e| panic!("unable to create file: {:?}. Error: {:?}", output, e));
    serde_yaml::to_writer(file, &state).expect("should be able to serialize BeaconState");
}
/// Creates a genesis state and writes it to a YAML file.
Creates a genesis state and writes it to a YAML file.
Creates a genesis state and writes it to a YAML file .
fn genesis_yaml<T: EthSpec>(validator_count: usize, genesis_time: u64, output: PathBuf) {
    let spec = &T::default_spec();
    let builder: TestingBeaconStateBuilder<T> =
        TestingBeaconStateBuilder::from_deterministic_keypairs(validator_count, spec);
    let (mut state, _keypairs) = builder.build();
    state.genesis_time = genesis_time;
    info!("Generated state root: {:?}", state.canonical_root());
    info!("Writing genesis state to {:?}", output);
    let file = File::create(output.clone())
        .unwrap_or_else(|e| panic!("unable to create file: {:?}. Error: {:?}", output, e));
    serde_yaml::to_writer(file, &state).expect("should be able to serialize BeaconState");
}
fn genesis_yaml < T : EthSpec > ( validator_count : usize , genesis_time : u64 , output : PathBuf ) { let spec = & T :: default_spec ( ) ; let builder : TestingBeaconStateBuilder < T > = TestingBeaconStateBuilder :: from_deterministic_keypairs ( validator_count , spec ) ; let ( mut state , _keypairs ) = builder . build ( ) ; state . genesis_time = genesis_time ; info ! ( " " state canonical_root ( ) ) ; info ! ( " " output ) ; let file = File :: create ( output . clone ( ) ) . unwrap_or_else ( | e | panic ! ( " " output e ) ) ; serde_yaml :: to_writer ( file , & state ) . expect ( " " ) ; }
Creates a genesis state and writes it to a YAML file.
Creates a genesis state and writes it to a YAML file .
validator_count
usize
genesis_time
u64
output
PathBuf