Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/attestation_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 2 additions & 7 deletions common/eth2/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions validator_client/http_api/src/tests/keystores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion validator_client/initialized_validators/src/key_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down
Loading