mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix clippy warnings (#813)
* Clippy account manager * Clippy account_manager * Clippy beacon_node/beacon_chain * Clippy beacon_node/client * Clippy beacon_node/eth1 * Clippy beacon_node/eth2-libp2p * Clippy beacon_node/genesis * Clippy beacon_node/network * Clippy beacon_node/rest_api * Clippy beacon_node/src * Clippy beacon_node/store * Clippy eth2/lmd_ghost * Clippy eth2/operation_pool * Clippy eth2/state_processing * Clippy eth2/types * Clippy eth2/utils/bls * Clippy eth2/utils/cahced_tree_hash * Clippy eth2/utils/deposit_contract * Clippy eth2/utils/eth2_interop_keypairs * Clippy eth2/utils/eth2_testnet_config * Clippy eth2/utils/lighthouse_metrics * Clippy eth2/utils/ssz * Clippy eth2/utils/ssz_types * Clippy eth2/utils/tree_hash_derive * Clippy lcli * Clippy tests/beacon_chain_sim * Clippy validator_client * Cargo fmt
This commit is contained in:
@@ -194,8 +194,9 @@ impl<T: SlotClock + 'static, E: EthSpec> AttestationService<T, E> {
|
||||
.into_iter()
|
||||
.for_each(|duty| {
|
||||
if let Some(committee_index) = duty.attestation_committee_index {
|
||||
let validator_duties =
|
||||
committee_indices.entry(committee_index).or_insert(vec![]);
|
||||
let validator_duties = committee_indices
|
||||
.entry(committee_index)
|
||||
.or_insert_with(|| vec![]);
|
||||
|
||||
validator_duties.push(duty);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ impl<T: SlotClock + 'static, E: EthSpec> DutiesService<T, E> {
|
||||
/// Attempt to download the duties of all managed validators for the given `epoch`.
|
||||
fn update_epoch(self, epoch: Epoch) -> impl Future<Item = (), Error = String> {
|
||||
let service_1 = self.clone();
|
||||
let service_2 = self.clone();
|
||||
let service_2 = self;
|
||||
|
||||
let pubkeys = service_1.validator_store.voting_pubkeys();
|
||||
service_1
|
||||
|
||||
@@ -384,12 +384,11 @@ mod tests {
|
||||
"withdrawal keypair should be as expected"
|
||||
);
|
||||
assert!(
|
||||
created_dir
|
||||
!created_dir
|
||||
.deposit_data
|
||||
.clone()
|
||||
.expect("should have data")
|
||||
.len()
|
||||
> 0,
|
||||
.is_empty(),
|
||||
"should have some deposit data"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user