diff --git a/beacon_chain/types/src/crystallized_state.rs b/beacon_chain/types/src/crystallized_state.rs index ff81202cf..454454a17 100644 --- a/beacon_chain/types/src/crystallized_state.rs +++ b/beacon_chain/types/src/crystallized_state.rs @@ -1,5 +1,5 @@ use super::crosslink_record::CrosslinkRecord; -use super::shard_and_committee::ShardAndCommittee; +use super::shard_committee::ShardCommittee; use super::validator_record::ValidatorRecord; use super::Hash256; @@ -12,7 +12,7 @@ pub struct CrystallizedState { pub last_finalized_slot: u64, pub last_justified_slot: u64, pub justified_streak: u64, - pub shard_and_committee_for_slots: Vec>, + pub shard_and_committee_for_slots: Vec>, pub deposits_penalized_in_period: Vec, pub validator_set_delta_hash_chain: Hash256, pub pre_fork_version: u32, diff --git a/beacon_chain/types/src/shard_committee.rs b/beacon_chain/types/src/shard_committee.rs index 2dc0f6a75..75208670f 100644 --- a/beacon_chain/types/src/shard_committee.rs +++ b/beacon_chain/types/src/shard_committee.rs @@ -21,7 +21,7 @@ mod tests { #[test] fn test_shard_and_committee_zero() { - let s = ShardAndCommittee::zero(); + let s = ShardCommittee::zero(); assert_eq!(s.shard, 0); assert_eq!(s.committee.len(), 0); } diff --git a/beacon_chain/validator_shuffling/src/shuffle.rs b/beacon_chain/validator_shuffling/src/shuffle.rs index 3b3009e5d..a9315e726 100644 --- a/beacon_chain/validator_shuffling/src/shuffle.rs +++ b/beacon_chain/validator_shuffling/src/shuffle.rs @@ -3,10 +3,10 @@ use std::cmp::min; use active_validators::active_validator_indices; use honey_badger_split::SplitExt; use spec::ChainSpec; -use types::{ShardAndCommittee, ValidatorRecord}; +use types::{ShardCommittee, ValidatorRecord}; use vec_shuffle::{shuffle, ShuffleErr}; -type DelegatedCycle = Vec>; +type DelegatedCycle = Vec>; #[derive(Debug, PartialEq)] pub enum ValidatorAssignmentError { @@ -85,7 +85,7 @@ fn generate_cycle( slot_indices .honey_badger_split(committees_per_slot) .enumerate() - .map(|(j, shard_indices)| ShardAndCommittee { + .map(|(j, shard_indices)| ShardCommittee { shard: ((shard_start + j) % shard_count) as u16, committee: shard_indices.to_vec(), }).collect()