mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 14:54:45 +00:00
Update to spec v0.8.3
This commit is contained in:
@@ -298,14 +298,6 @@ impl<T: EthSpec> BeaconState<T> {
|
||||
Ok(cache.epoch_start_shard())
|
||||
}
|
||||
|
||||
pub fn next_epoch_start_shard(&self, spec: &ChainSpec) -> Result<u64, Error> {
|
||||
let cache = self.cache(RelativeEpoch::Current)?;
|
||||
let active_validator_count = cache.active_validator_count();
|
||||
let shard_delta = T::get_shard_delta(active_validator_count, spec.target_committee_size);
|
||||
|
||||
Ok((self.start_shard + shard_delta) % T::ShardCount::to_u64())
|
||||
}
|
||||
|
||||
/// Get the slot of an attestation.
|
||||
///
|
||||
/// Note: Utilizes the cache and will fail if the appropriate cache is not initialized.
|
||||
|
||||
Reference in New Issue
Block a user