mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 20:22:02 +00:00
Fix clippy warnings (#1385)
## Issue Addressed NA ## Proposed Changes Fixes most clippy warnings and ignores the rest of them, see issue #1388.
This commit is contained in:
@@ -129,7 +129,7 @@ impl<'a, T: EthSpec> BlockProcessingBuilder<'a, T> {
|
||||
signature: AggregateSignature::new(),
|
||||
};
|
||||
|
||||
for (i, &validator_index) in committee.committee.into_iter().enumerate() {
|
||||
for (i, &validator_index) in committee.committee.iter().enumerate() {
|
||||
if should_sign(i, validator_index) {
|
||||
attestation
|
||||
.sign(
|
||||
|
||||
@@ -83,7 +83,7 @@ where
|
||||
/// add signatures, and the `verify`
|
||||
pub fn new(state: &'a BeaconState<T>, get_pubkey: F, spec: &'a ChainSpec) -> Self {
|
||||
Self {
|
||||
get_pubkey: get_pubkey,
|
||||
get_pubkey,
|
||||
state,
|
||||
spec,
|
||||
sets: vec![],
|
||||
@@ -129,7 +129,7 @@ where
|
||||
.sets
|
||||
.into_par_iter()
|
||||
.chunks(num_chunks)
|
||||
.map(|chunk| verify_signature_sets(chunk))
|
||||
.map(verify_signature_sets)
|
||||
.reduce(|| true, |current, this| current && this);
|
||||
|
||||
if result {
|
||||
|
||||
@@ -314,8 +314,8 @@ pub fn deposit_pubkey_signature_message(
|
||||
|
||||
/// Returns the signature set for some set of deposit signatures, made with
|
||||
/// `deposit_pubkey_signature_message`.
|
||||
pub fn deposit_signature_set<'a>(
|
||||
pubkey_signature_message: &'a (PublicKey, Signature, Vec<u8>),
|
||||
pub fn deposit_signature_set(
|
||||
pubkey_signature_message: &(PublicKey, Signature, Vec<u8>),
|
||||
) -> SignatureSet {
|
||||
let (pubkey, signature, message) = pubkey_signature_message;
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ fn verify_casper_ffg_vote<T: EthSpec>(
|
||||
verify!(
|
||||
data.source == state.current_justified_checkpoint,
|
||||
Invalid::WrongJustifiedCheckpoint {
|
||||
state: state.current_justified_checkpoint.clone(),
|
||||
attestation: data.source.clone(),
|
||||
state: state.current_justified_checkpoint,
|
||||
attestation: data.source,
|
||||
is_current: true,
|
||||
}
|
||||
);
|
||||
@@ -103,8 +103,8 @@ fn verify_casper_ffg_vote<T: EthSpec>(
|
||||
verify!(
|
||||
data.source == state.previous_justified_checkpoint,
|
||||
Invalid::WrongJustifiedCheckpoint {
|
||||
state: state.previous_justified_checkpoint.clone(),
|
||||
attestation: data.source.clone(),
|
||||
state: state.previous_justified_checkpoint,
|
||||
attestation: data.source,
|
||||
is_current: false,
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user