mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-29 10:43:42 +00:00
Rust 1.91 lints (#8340)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
This commit is contained in:
@@ -1344,7 +1344,7 @@ pub fn verify_signed_aggregate_signatures<T: BeaconChainTypes>(
|
||||
.spec
|
||||
.fork_at_epoch(indexed_attestation.data().target.epoch);
|
||||
|
||||
let signature_sets = vec![
|
||||
let signature_sets = [
|
||||
signed_aggregate_selection_proof_signature_set(
|
||||
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
|
||||
signed_aggregate,
|
||||
|
||||
@@ -628,7 +628,7 @@ pub fn verify_signed_aggregate_signatures<T: BeaconChainTypes>(
|
||||
(signed_aggregate.message.contribution.slot + 1).epoch(T::EthSpec::slots_per_epoch());
|
||||
let fork = chain.spec.fork_at_epoch(next_slot_epoch);
|
||||
|
||||
let signature_sets = vec![
|
||||
let signature_sets = [
|
||||
signed_sync_aggregate_selection_proof_signature_set(
|
||||
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
|
||||
signed_aggregate,
|
||||
|
||||
@@ -1560,20 +1560,15 @@ pub struct ForkChoiceNode {
|
||||
pub execution_block_hash: Option<Hash256>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum BroadcastValidation {
|
||||
#[default]
|
||||
Gossip,
|
||||
Consensus,
|
||||
ConsensusAndEquivocation,
|
||||
}
|
||||
|
||||
impl Default for BroadcastValidation {
|
||||
fn default() -> Self {
|
||||
Self::Gossip
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for BroadcastValidation {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
|
||||
@@ -2091,7 +2091,7 @@ async fn import_remotekey_web3signer_disabled() {
|
||||
// Import web3signers.
|
||||
tester
|
||||
.client
|
||||
.post_lighthouse_validators_web3signer(&vec![web3signer_req])
|
||||
.post_lighthouse_validators_web3signer(&[web3signer_req])
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -2146,7 +2146,7 @@ async fn import_remotekey_web3signer_enabled() {
|
||||
// Import web3signers.
|
||||
tester
|
||||
.client
|
||||
.post_lighthouse_validators_web3signer(&vec![web3signer_req.clone()])
|
||||
.post_lighthouse_validators_web3signer(&[web3signer_req.clone()])
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn test_encryption() {
|
||||
let mut key_cache = KeyCache::new();
|
||||
let keypairs = vec![Keypair::random(), Keypair::random()];
|
||||
let keypairs = [Keypair::random(), Keypair::random()];
|
||||
let uuids = vec![Uuid::from_u128(1), Uuid::from_u128(2)];
|
||||
let passwords = vec![
|
||||
PlainText::from(vec![1, 2, 3, 4, 5, 6]),
|
||||
|
||||
Reference in New Issue
Block a user