2019-02-26 03:27:42 +00:00
|
|
|
#![cfg(test)]
|
2019-03-06 07:57:41 +00:00
|
|
|
use crate::per_epoch_processing;
|
2019-03-08 23:37:41 +00:00
|
|
|
use benching_utils::BeaconStateBencher;
|
2019-02-26 03:27:42 +00:00
|
|
|
use env_logger::{Builder, Env};
|
|
|
|
use types::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn runs_without_error() {
|
|
|
|
Builder::from_env(Env::default().default_filter_or("error")).init();
|
|
|
|
|
2019-03-08 23:37:41 +00:00
|
|
|
let spec = ChainSpec::few_validators();
|
2019-02-26 03:27:42 +00:00
|
|
|
|
2019-03-08 23:37:41 +00:00
|
|
|
let mut builder = BeaconStateBencher::new(8, &spec);
|
|
|
|
builder.teleport_to_end_of_epoch(spec.genesis_epoch + 4, &spec);
|
|
|
|
let mut state = builder.build();
|
2019-02-26 03:27:42 +00:00
|
|
|
|
2019-03-08 23:37:41 +00:00
|
|
|
per_epoch_processing(&mut state, &spec).unwrap();
|
2019-02-26 03:27:42 +00:00
|
|
|
}
|