Skip to content

Commit

Permalink
Drop TestRandom impl
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Jun 17, 2024
1 parent 2e67125 commit ed65a6a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions consensus/types/src/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::slot_data::SlotData;
use crate::ForkName;
use crate::{test_utils::TestRandom, Hash256, Slot};
use derivative::Derivative;
use rand::RngCore;
use safe_arith::ArithError;
use serde::{Deserialize, Serialize};
use ssz_derive::{Decode, Encode};
Expand Down Expand Up @@ -77,23 +76,6 @@ pub struct Attestation<E: EthSpec> {
pub signature: AggregateSignature,
}

// TODO(electra): think about how to handle fork variants here
impl<E: EthSpec> TestRandom for Attestation<E> {
fn random_for_test(rng: &mut impl RngCore) -> Self {
let aggregation_bits = BitList::random_for_test(rng);
let data = AttestationData::random_for_test(rng);
let signature = AggregateSignature::random_for_test(rng);
let committee_bits = BitVector::random_for_test(rng);

Self::Electra(AttestationElectra {
aggregation_bits,
committee_bits,
data,
signature,
})
}
}

impl<E: EthSpec> Hash for Attestation<E> {
fn hash<H>(&self, state: &mut H)
where
Expand Down

0 comments on commit ed65a6a

Please sign in to comment.