mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Linting
This commit is contained in:
@@ -820,7 +820,7 @@ impl<E: EthSpec> BeaconState<E> {
|
||||
) -> Result<InclusionListCommittee<E>, Error> {
|
||||
let epoch = slot.epoch(E::slots_per_epoch());
|
||||
let current_epoch = self.current_epoch();
|
||||
let next_epoch = current_epoch + 1;
|
||||
let next_epoch = current_epoch.safe_add(1)?;
|
||||
if epoch != current_epoch || epoch != next_epoch {
|
||||
return Err(Error::SlotOutOfBounds);
|
||||
}
|
||||
@@ -828,9 +828,10 @@ impl<E: EthSpec> BeaconState<E> {
|
||||
let seed = self.get_inclusion_list_seed(slot, spec)?;
|
||||
let indices = self.get_active_validator_indices(epoch, spec)?;
|
||||
|
||||
let start =
|
||||
(slot % E::slots_per_epoch()).as_usize() * E::InclusionListCommitteeSize::to_usize();
|
||||
let end = start + E::InclusionListCommitteeSize::to_usize();
|
||||
let start = (slot.safe_rem(E::slots_per_epoch())?)
|
||||
.as_usize()
|
||||
.safe_mul(E::InclusionListCommitteeSize::to_usize())?;
|
||||
let end = start.safe_add(E::InclusionListCommitteeSize::to_usize())?;
|
||||
|
||||
let mut i = start;
|
||||
let mut il_committee_indices =
|
||||
|
||||
@@ -6,7 +6,6 @@ use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use ssz_types::VariableList;
|
||||
use test_random_derive::TestRandom;
|
||||
use tree_hash::TreeHash;
|
||||
use tree_hash_derive::TreeHash;
|
||||
|
||||
pub type InclusionListTransactions<E> = VariableList<
|
||||
|
||||
Reference in New Issue
Block a user