spec v0.6.1: update per-epoch processing

This commit is contained in:
Michael Sproul
2019-05-21 11:47:52 +10:00
parent d3d2900a6a
commit 56424d94c6
4 changed files with 13 additions and 35 deletions

View File

@@ -161,7 +161,8 @@ pub fn process_crosslinks<T: EthSpec>(
for relative_epoch in vec![RelativeEpoch::Previous, RelativeEpoch::Current] {
let epoch = relative_epoch.into_epoch(state.current_epoch());
for offset in 0..state.get_epoch_committee_count(relative_epoch)? {
let shard = (state.get_epoch_start_shard(relative_epoch)? + offset) % spec.shard_count;
let shard =
(state.get_epoch_start_shard(relative_epoch)? + offset) % T::ShardCount::to_u64();
let crosslink_committee =
state.get_crosslink_committee_for_shard(shard, relative_epoch)?;