mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +00:00
Disable legacy-arith by default in consensus/types (#8695)
Currently, `consensus/types` cannot build with `no-default-features` since we use "legacy" standard arithmetic operations. - Remove the offending arithmetic to fix compilation. - Rename `legacy-arith` to `saturating-arith` and disable it by default. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -2,6 +2,7 @@ use crate::data_availability_checker::{AvailableBlock, AvailableBlockData};
|
||||
use crate::{BeaconChainError as Error, metrics};
|
||||
use parking_lot::RwLock;
|
||||
use proto_array::Block as ProtoBlock;
|
||||
use safe_arith::SafeArith;
|
||||
use std::sync::Arc;
|
||||
use tracing::instrument;
|
||||
use types::*;
|
||||
@@ -59,12 +60,13 @@ impl CommitteeLengths {
|
||||
slots_per_epoch,
|
||||
committees_per_slot,
|
||||
committee_index as usize,
|
||||
);
|
||||
)?;
|
||||
let epoch_committee_count = committees_per_slot.safe_mul(slots_per_epoch)?;
|
||||
let range = compute_committee_range_in_epoch(
|
||||
epoch_committee_count(committees_per_slot, slots_per_epoch),
|
||||
epoch_committee_count,
|
||||
index_in_epoch,
|
||||
self.active_validator_indices_len,
|
||||
)
|
||||
)?
|
||||
.ok_or(Error::EarlyAttesterCacheError)?;
|
||||
|
||||
range
|
||||
|
||||
Reference in New Issue
Block a user