Merge pull request #3570 from etan-status/ts-attprevepoch

Add guard when `fill_prev_epoch` is `True` in epoch `0`
This commit is contained in:
Hsiao-Wei Wang 2024-01-15 22:46:46 +08:00 committed by GitHub
commit 9b04d10a6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ def state_transition_with_full_block(spec,
) )
for attestation in attestations: for attestation in attestations:
block.body.attestations.append(attestation) block.body.attestations.append(attestation)
if fill_prev_epoch: if fill_prev_epoch and state.slot >= spec.SLOTS_PER_EPOCH:
slot_to_attest = state.slot - spec.SLOTS_PER_EPOCH + 1 slot_to_attest = state.slot - spec.SLOTS_PER_EPOCH + 1
attestations = get_valid_attestation_at_slot( attestations = get_valid_attestation_at_slot(
state, state,