mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 12:11:59 +00:00
Fix clippy's performance lints (#1286)
* Fix clippy perf lints * Cargo fmt * Add and to lint rule in Makefile * Fix some leftover clippy lints
This commit is contained in:
@@ -230,12 +230,12 @@ impl DutiesStore {
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn is_aggregator(&self, validator_pubkey: &PublicKey, epoch: &Epoch) -> Option<bool> {
|
||||
fn is_aggregator(&self, validator_pubkey: &PublicKey, epoch: Epoch) -> Option<bool> {
|
||||
Some(
|
||||
self.store
|
||||
.read()
|
||||
.get(validator_pubkey)?
|
||||
.get(epoch)?
|
||||
.get(&epoch)?
|
||||
.selection_proof
|
||||
.is_some(),
|
||||
)
|
||||
@@ -602,7 +602,7 @@ impl<T: SlotClock + 'static, E: EthSpec> DutiesService<T, E> {
|
||||
|
||||
// The selection proof is computed on `store.insert`, so it's necessary to check
|
||||
// with the store that the validator is an aggregator.
|
||||
let is_aggregator = self.store.is_aggregator(&validator_pubkey, &epoch)?;
|
||||
let is_aggregator = self.store.is_aggregator(&validator_pubkey, epoch)?;
|
||||
|
||||
if outcome.is_subscription_candidate() {
|
||||
Some(ValidatorSubscription {
|
||||
|
||||
Reference in New Issue
Block a user