mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-18 12:22:51 +00:00
superstruct the AttesterSlashing (#5636)
* `superstruct` Attester Fork Variants * Push a little further * Deal with Encode / Decode of AttesterSlashing * not so sure about this.. * Stop Encode/Decode Bounds from Propagating Out * Tons of Changes.. * More Conversions to AttestationRef * Add AsReference trait (#15) * Add AsReference trait * Fix some snafus * Got it Compiling! :D * Got Tests Building * Get beacon chain tests compiling --------- Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
@@ -2,8 +2,9 @@ use crate::AttestationStats;
|
||||
use itertools::Itertools;
|
||||
use std::collections::HashMap;
|
||||
use types::{
|
||||
attestation::{AttestationBase, AttestationElectra}, superstruct, AggregateSignature, Attestation, AttestationData,
|
||||
BeaconState, BitList, BitVector, Checkpoint, Epoch, EthSpec, Hash256, Slot,
|
||||
attestation::{AttestationBase, AttestationElectra},
|
||||
superstruct, AggregateSignature, Attestation, AttestationData, BeaconState, BitList, BitVector,
|
||||
Checkpoint, Epoch, EthSpec, Hash256, Slot,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
|
||||
@@ -121,12 +122,14 @@ impl<'a, E: EthSpec> AttestationRef<'a, E> {
|
||||
data: self.attestation_data(),
|
||||
signature: indexed_att.signature.clone(),
|
||||
}),
|
||||
CompactIndexedAttestation::Electra(indexed_att) => Attestation::Electra(AttestationElectra {
|
||||
aggregation_bits: indexed_att.aggregation_bits.clone(),
|
||||
data: self.attestation_data(),
|
||||
signature: indexed_att.signature.clone(),
|
||||
committee_bits: indexed_att.committee_bits.clone(),
|
||||
}),
|
||||
CompactIndexedAttestation::Electra(indexed_att) => {
|
||||
Attestation::Electra(AttestationElectra {
|
||||
aggregation_bits: indexed_att.aggregation_bits.clone(),
|
||||
data: self.attestation_data(),
|
||||
signature: indexed_att.signature.clone(),
|
||||
committee_bits: indexed_att.committee_bits.clone(),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user