Fix overly restrictive check in fork choice.

This commit is contained in:
Paul Hauner
2019-08-09 12:23:10 +10:00
parent 76bb671084
commit d191812d4b
3 changed files with 27 additions and 20 deletions

View File

@@ -136,9 +136,6 @@ pub enum AttestationInvalid {
delay: u64,
attestation: Slot,
},
/// The attestation is attesting to a state that is later than itself. (Viz., attesting to the
/// future).
AttestsToFutureState { state: Slot, attestation: Slot },
/// Attestation slot is too far in the past to be included in a block.
IncludedTooLate { state: Slot, attestation: Slot },
/// Attestation target epoch does not match the current or previous epoch.

View File

@@ -62,17 +62,6 @@ pub fn verify_attestation_for_state<T: EthSpec>(
Invalid::BadShard
);
let attestation_slot = state.get_attestation_data_slot(&data)?;
// An attestation cannot attest to a state that is later than itself.
verify!(
attestation_slot <= state.slot,
Invalid::AttestsToFutureState {
state: state.slot,
attestation: attestation_slot
}
);
// Verify the Casper FFG vote and crosslink data.
let parent_crosslink = verify_casper_ffg_vote(attestation, state)?;