Skip to content

Commit

Permalink
Merge pull request #3570 from etan-status/ts-attprevepoch
Browse files Browse the repository at this point in the history
Add guard when `fill_prev_epoch` is `True` in epoch `0`
  • Loading branch information
hwwhww committed Jan 15, 2024
2 parents 85bd77b + 0e15532 commit 9b04d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/core/pyspec/eth2spec/test/helpers/attestations.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def state_transition_with_full_block(spec,
)
for attestation in attestations:
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
attestations = get_valid_attestation_at_slot(
state,
Expand Down

0 comments on commit 9b04d10

Please sign in to comment.