Skip to content

Commit

Permalink
drop previous_epoch_total_active_balance
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Feb 14, 2024
1 parent 90ee50f commit f420033
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion beacon_node/http_api/src/validator_inclusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ pub fn global_validator_inclusion_data<T: BeaconChainTypes>(

Ok(GlobalValidatorInclusionData {
current_epoch_active_gwei: summary.current_epoch_total_active_balance(),
previous_epoch_active_gwei: summary.previous_epoch_total_active_balance(),
current_epoch_target_attesting_gwei: summary
.current_epoch_target_attesting_balance()
.map_err(convert_cache_error)?,
Expand Down
2 changes: 0 additions & 2 deletions common/eth2/src/lighthouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ pub struct Peer<T: EthSpec> {
pub struct GlobalValidatorInclusionData {
/// The total effective balance of all active validators during the _current_ epoch.
pub current_epoch_active_gwei: u64,
/// The total effective balance of all active validators during the _previous_ epoch.
pub previous_epoch_active_gwei: u64,
/// The total effective balance of all validators who attested during the _current_ epoch and
/// agreed with the state about the beacon block at the first slot of the _current_ epoch.
pub current_epoch_target_attesting_gwei: u64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ impl<T: EthSpec> EpochProcessingSummary<T> {
&metrics::PARTICIPATION_PREV_EPOCH_SOURCE_ATTESTING_GWEI_TOTAL,
self.previous_epoch_source_attesting_balance()? as i64,
);
metrics::set_gauge(
&metrics::PARTICIPATION_PREV_EPOCH_ACTIVE_GWEI_TOTAL,
self.previous_epoch_total_active_balance() as i64,
);

Ok(())
}
Expand Down Expand Up @@ -141,12 +137,6 @@ impl<T: EthSpec> EpochProcessingSummary<T> {
}
}

/// Returns the sum of the effective balance of all validators in the previous epoch.
pub fn previous_epoch_total_active_balance(&self) -> u64 {
// FIXME(sproul): this is not a useful concept and should be deleted
self.current_epoch_total_active_balance()
}

/// Returns `true` if `val_index` was included in the active validator indices in the current
/// epoch *and* the validator is not slashed.
///
Expand Down

0 comments on commit f420033

Please sign in to comment.