From 958f71bb68e6dede30a1e875cadb85edb880a9a4 Mon Sep 17 00:00:00 2001 From: protolambda Date: Wed, 22 May 2019 21:03:46 +0200 Subject: [PATCH] minor underflow fix for proposer slashing test --- .../test/block_processing/test_process_proposer_slashing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_libs/pyspec/eth2spec/test/block_processing/test_process_proposer_slashing.py b/test_libs/pyspec/eth2spec/test/block_processing/test_process_proposer_slashing.py index 7ec10406d..07ccc25f1 100644 --- a/test_libs/pyspec/eth2spec/test/block_processing/test_process_proposer_slashing.py +++ b/test_libs/pyspec/eth2spec/test/block_processing/test_process_proposer_slashing.py @@ -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