minor underflow fix for proposer slashing test

This commit is contained in:
protolambda 2019-05-22 21:03:46 +02:00
parent 58fd712607
commit 958f71bb68
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623

View File

@ -127,6 +127,8 @@ def test_proposer_is_slashed(state):
def test_proposer_is_withdrawn(state):
proposer_slashing = get_valid_proposer_slashing(state, signed_1=True, signed_2=True)
# move 1 epoch into future, to allow for past withdrawable epoch
state.slot += spec.SLOTS_PER_EPOCH
# set proposer withdrawable_epoch in past
current_epoch = get_current_epoch(state)
proposer_index = proposer_slashing.proposer_index