Skip to content

Commit 9b04d10

Browse files
authored
Merge pull request #3570 from etan-status/ts-attprevepoch
Add guard when `fill_prev_epoch` is `True` in epoch `0`
2 parents 85bd77b + 0e15532 commit 9b04d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/core/pyspec/eth2spec/test/helpers/attestations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def state_transition_with_full_block(spec,
280280
)
281281
for attestation in attestations:
282282
block.body.attestations.append(attestation)
283-
if fill_prev_epoch:
283+
if fill_prev_epoch and state.slot >= spec.SLOTS_PER_EPOCH:
284284
slot_to_attest = state.slot - spec.SLOTS_PER_EPOCH + 1
285285
attestations = get_valid_attestation_at_slot(
286286
state,

0 commit comments

Comments
 (0)