spec: fix off-by-one, allows state_sim to continue

This commit is contained in:
Jacek Sieka 2019-02-06 20:53:05 +01:00
parent 2f96c4bade
commit 337aa83f1a
No known key found for this signature in database
GPG Key ID: 6299FEB3EB6FA465

View File

@ -451,7 +451,7 @@ func inclusion_distance(state: BeaconState, v: ValidatorIndex): uint64 =
func processEpoch(state: var BeaconState) =
## https://github.com/ethereum/eth2.0-specs/blob/master/specs/core/0_beacon-chain.md#per-epoch-processing
if state.slot mod EPOCH_LENGTH != 0:
if (state.slot + 1) mod EPOCH_LENGTH != 0:
return
# Precomputation