fn fuzz<T: EthSpec>(ssz_bytes: &[u8]) -> Result<Vec<u8>, ()> {
    let test_case = match BlockTestCase::from_ssz_bytes(&ssz_bytes) {
        Ok(test_case) => test_case,
        Err(e) => panic!(
            "rs deserialization failed. Preproc should ensure decodable: {:?}",
            e
        ),
    };

    // TODO(gnattishness) allow validate_state_root to be enabled/disabled at compile time
    // e.g. https://doc.rust-lang.org/cargo/reference/manifest.html
    // https://stackoverflow.com/questions/32291210/how-to-choose-between-macros-at-compile-time
    let post_state: BeaconState<T> = match test_case.state_transition(true) {
        Ok(state) => state,
        _ => return Err(()),
    };

    Ok(post_state.as_ssz_bytes())
}
/// Accepts an SSZ-encoded `BlockTestCase` and returns an SSZ-encoded post-state on success,
/// or nothing on failure.
Accepts an SSZ-encoded `BlockTestCase` and returns an SSZ-encoded post-state on success,
or nothing on failure.
Accepts an SSZ - encoded ` BlockTestCase ` and returns an SSZ - encoded post - state on success or nothing on failure .
fn fuzz<T: EthSpec>(ssz_bytes: &[u8]) -> Result<Vec<u8>, ()> {
    let test_case = match BlockTestCase::from_ssz_bytes(&ssz_bytes) {
        Ok(test_case) => test_case,
        Err(e) => panic!(
            "rs deserialization failed. Preproc should ensure decodable: {:?}",
            e
        ),
    };
    // TODO(gnattishness) allow validate_state_root to be enabled/disabled at compile time
    // e.g. https://doc.rust-lang.org/cargo/reference/manifest.html
    // https://stackoverflow.com/questions/32291210/how-to-choose-between-macros-at-compile-time
    let post_state: BeaconState<T> = match test_case.state_transition(true) {
        Ok(state) => state,
        _ => return Err(()),
    };
    Ok(post_state.as_ssz_bytes())
}
fn fuzz < T : EthSpec > ( ssz_bytes : & [ u8 ] ) -> Result < Vec < u8 > , ( ) > { let test_case = match BlockTestCase :: from_ssz_bytes ( & ssz_bytes ) { Ok ( test_case ) => test_case , Err ( e ) => panic ! ( " " e ) , } ; // TODO(gnattishness) allow validate_state_root to be enabled/disabled at compile time // e.g. https://doc.rust-lang.org/cargo/reference/manifest.html // https://stackoverflow.com/questions/32291210/how-to-choose-between-macros-at-compile-time let post_state : BeaconState < T > = match test_case . state_transition ( true ) { Ok ( state ) => state , _ => return Err ( ( ) ) , } ; Ok ( post_state . as_ssz_bytes ( ) ) }
Accepts an SSZ-encoded `BlockTestCase` and returns an SSZ-encoded post-state on success,
or nothing on failure.
Accepts an SSZ - encoded ` BlockTestCase ` and returns an SSZ - encoded post - state on success or nothing on failure .
ssz_bytes
&[u8]
ssz_bytes
&[u8]