mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
fixup: remove some unused variables
This commit is contained in:
@@ -77,7 +77,7 @@ fn validate_attestation_parametric<T: EthSpec>(
|
||||
|
||||
// Verify the Casper FFG vote.
|
||||
if !time_independent_only {
|
||||
verify_casper_ffg_vote(attestation, state, spec)?;
|
||||
verify_casper_ffg_vote(attestation, state)?;
|
||||
}
|
||||
|
||||
// Crosslink data root is zero (to be removed in phase 1).
|
||||
@@ -103,7 +103,6 @@ fn validate_attestation_parametric<T: EthSpec>(
|
||||
fn verify_casper_ffg_vote<T: EthSpec>(
|
||||
attestation: &Attestation,
|
||||
state: &BeaconState<T>,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<(), Error> {
|
||||
let data = &attestation.data;
|
||||
if data.target_epoch == state.current_epoch() {
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn verify_attester_slashing<T: EthSpec>(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// For a given attester slashing, return the indices able to be slashed.
|
||||
/// For a given attester slashing, return the indices able to be slashed in ascending order.
|
||||
///
|
||||
/// Returns Ok(indices) if `indices.len() > 0`.
|
||||
///
|
||||
@@ -43,14 +43,10 @@ pub fn verify_attester_slashing<T: EthSpec>(
|
||||
pub fn get_slashable_indices<T: EthSpec>(
|
||||
state: &BeaconState<T>,
|
||||
attester_slashing: &AttesterSlashing,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<Vec<u64>, Error> {
|
||||
get_slashable_indices_modular(
|
||||
state,
|
||||
attester_slashing,
|
||||
|_, validator| validator.is_slashable_at(state.current_epoch()),
|
||||
spec,
|
||||
)
|
||||
get_slashable_indices_modular(state, attester_slashing, |_, validator| {
|
||||
validator.is_slashable_at(state.current_epoch())
|
||||
})
|
||||
}
|
||||
|
||||
/// Same as `gather_attester_slashing_indices` but allows the caller to specify the criteria
|
||||
@@ -59,7 +55,6 @@ pub fn get_slashable_indices_modular<F, T: EthSpec>(
|
||||
state: &BeaconState<T>,
|
||||
attester_slashing: &AttesterSlashing,
|
||||
is_slashable: F,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<Vec<u64>, Error>
|
||||
where
|
||||
F: Fn(u64, &Validator) -> bool,
|
||||
|
||||
Reference in New Issue
Block a user