Do project-wide s/epoch_length/slots_per_epoch/g

This commit is contained in:
Paul Hauner
2019-03-04 17:51:54 +11:00
parent a1af65ce1a
commit 663d39739f
29 changed files with 113 additions and 112 deletions

View File

@@ -11,7 +11,7 @@ fn mid_epoch_state_transition(c: &mut Criterion) {
let validator_count = 1000;
let mut rig = BeaconChainHarness::new(ChainSpec::foundation(), validator_count);
let epoch_depth = (rig.spec.epoch_length * 2) + (rig.spec.epoch_length / 2);
let epoch_depth = (rig.spec.slots_per_epoch * 2) + (rig.spec.slots_per_epoch / 2);
for _ in 0..epoch_depth {
rig.advance_chain_with_block();
@@ -19,7 +19,7 @@ fn mid_epoch_state_transition(c: &mut Criterion) {
let state = rig.beacon_chain.state.read().clone();
assert!((state.slot + 1) % rig.spec.epoch_length != 0);
assert!((state.slot + 1) % rig.spec.slots_per_epoch != 0);
c.bench_function("mid-epoch state transition 10k validators", move |b| {
let state = state.clone();
@@ -36,7 +36,7 @@ fn epoch_boundary_state_transition(c: &mut Criterion) {
let validator_count = 10000;
let mut rig = BeaconChainHarness::new(ChainSpec::foundation(), validator_count);
let epoch_depth = rig.spec.epoch_length * 2;
let epoch_depth = rig.spec.slots_per_epoch * 2;
for _ in 0..(epoch_depth - 1) {
rig.advance_chain_with_block();
@@ -44,7 +44,7 @@ fn epoch_boundary_state_transition(c: &mut Criterion) {
let state = rig.beacon_chain.state.read().clone();
assert_eq!((state.slot + 1) % rig.spec.epoch_length, 0);
assert_eq!((state.slot + 1) % rig.spec.slots_per_epoch, 0);
c.bench(
"routines",