Update to spec v0.8.3

This commit is contained in:
Michael Sproul
2019-08-27 16:59:53 +10:00
parent 5a7903a377
commit 4d2cdc9492
5 changed files with 9 additions and 32 deletions

View File

@@ -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.