mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Attestation superstruct changes for EIP 7549 (#5644)
* update * experiment * superstruct changes * revert * superstruct changes * fix tests * indexed attestation * indexed attestation superstruct * updated TODOs
This commit is contained in:
@@ -22,7 +22,7 @@ pub fn verify_attestation_for_block_inclusion<'ctxt, E: EthSpec>(
|
||||
verify_signatures: VerifySignatures,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<&'ctxt IndexedAttestation<E>> {
|
||||
let data = &attestation.data;
|
||||
let data = attestation.data();
|
||||
|
||||
verify!(
|
||||
data.slot.safe_add(spec.min_attestation_inclusion_delay)? <= state.slot(),
|
||||
@@ -66,7 +66,7 @@ pub fn verify_attestation_for_state<'ctxt, E: EthSpec>(
|
||||
verify_signatures: VerifySignatures,
|
||||
spec: &ChainSpec,
|
||||
) -> Result<&'ctxt IndexedAttestation<E>> {
|
||||
let data = &attestation.data;
|
||||
let data = attestation.data();
|
||||
|
||||
verify!(
|
||||
data.index < state.get_committee_count_at_slot(data.slot)?,
|
||||
@@ -90,7 +90,7 @@ fn verify_casper_ffg_vote<E: EthSpec>(
|
||||
attestation: &Attestation<E>,
|
||||
state: &BeaconState<E>,
|
||||
) -> Result<()> {
|
||||
let data = &attestation.data;
|
||||
let data = attestation.data();
|
||||
verify!(
|
||||
data.target.epoch == data.slot.epoch(E::slots_per_epoch()),
|
||||
Invalid::TargetEpochSlotMismatch {
|
||||
|
||||
Reference in New Issue
Block a user