Add message about delaying consideration

This commit is contained in:
Paul Hauner 2020-04-30 16:27:02 +10:00 committed by GitHub
parent 1a81c873af
commit 2dc5156651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -273,6 +273,7 @@ def validate_on_attestation(store: Store, attestation: Attestation) -> None:
current_epoch = compute_epoch_at_slot(get_current_slot(store))
# Use GENESIS_EPOCH for previous when genesis to avoid underflow
previous_epoch = current_epoch - 1 if current_epoch > GENESIS_EPOCH else GENESIS_EPOCH
# If attestation target is from a future epoch, delay consideration until the epoch arrives
assert target.epoch in [current_epoch, previous_epoch]
assert target.epoch == compute_epoch_at_slot(attestation.data.slot)