mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Rust 1.54.0 lints (#2483)
## Issue Addressed N/A ## Proposed Changes - Removing a bunch of unnecessary references - Updated `Error::VariantError` to `Error::Variant` - There were additional enum variant lints that I ignored, because I thought our variant names were fine - removed `MonitoredValidator`'s `pubkey` field, because I couldn't find it used anywhere. It looks like we just use the string version of the pubkey (the `id` field) if there is no index ## Additional Info Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -698,8 +698,8 @@ where
|
||||
slot: Slot,
|
||||
) -> HarnessAttestations<E> {
|
||||
let unaggregated_attestations = self.make_unaggregated_attestations(
|
||||
&attesting_validators,
|
||||
&state,
|
||||
attesting_validators,
|
||||
state,
|
||||
state_root,
|
||||
block_hash,
|
||||
slot,
|
||||
@@ -785,7 +785,7 @@ where
|
||||
relative_sync_committee: RelativeSyncCommittee,
|
||||
) -> HarnessSyncContributions<E> {
|
||||
let sync_messages =
|
||||
self.make_sync_committee_messages(&state, block_hash, slot, relative_sync_committee);
|
||||
self.make_sync_committee_messages(state, block_hash, slot, relative_sync_committee);
|
||||
|
||||
let sync_contributions: Vec<Option<SignedContributionAndProof<E>>> = sync_messages
|
||||
.iter()
|
||||
@@ -825,7 +825,7 @@ where
|
||||
})?;
|
||||
|
||||
let default = SyncCommitteeContribution::from_message(
|
||||
&sync_message,
|
||||
sync_message,
|
||||
subnet_id as u64,
|
||||
*subcommittee_position,
|
||||
)
|
||||
@@ -989,7 +989,7 @@ where
|
||||
let mut signed_block_headers = vec![block_header_1, block_header_2]
|
||||
.into_iter()
|
||||
.map(|block_header| {
|
||||
block_header.sign::<E>(&sk, &fork, genesis_validators_root, &self.chain.spec)
|
||||
block_header.sign::<E>(sk, &fork, genesis_validators_root, &self.chain.spec)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
@@ -1199,7 +1199,7 @@ where
|
||||
validators: &[usize],
|
||||
) {
|
||||
let attestations =
|
||||
self.make_attestations(validators, &state, state_root, block_hash, block.slot());
|
||||
self.make_attestations(validators, state, state_root, block_hash, block.slot());
|
||||
self.process_attestations(attestations);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user