Update some Spec v.. comments & minor logic fix

This commit is contained in:
Paul Hauner
2019-05-22 12:17:40 +10:00
parent ea36c5ad35
commit 987afb6595
3 changed files with 9 additions and 9 deletions

View File

@@ -10,14 +10,14 @@ pub enum Error {
/// Advances a state forward by one slot, performing per-epoch processing if required.
///
/// Spec v0.5.1
/// Spec v0.6.1
pub fn per_slot_processing<T: EthSpec>(
state: &mut BeaconState<T>,
spec: &ChainSpec,
) -> Result<(), Error> {
cache_state(state, spec)?;
if (state.slot + 1) % spec.slots_per_epoch == 0 {
if (state.slot > spec.genesis_slot) && ((state.slot + 1) % spec.slots_per_epoch == 0) {
per_epoch_processing(state, spec)?;
}