update sanity generators to generate the oepration block tests as well

This commit is contained in:
Danny Ryan 2020-10-14 17:36:10 -06:00
parent c17a95a175
commit aab58e4700
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 3 additions and 2 deletions

View File

@ -42,7 +42,7 @@ def run_slash_and_exit(spec, state, slash_index, exit_index, valid=True):
@spec_state_test
def test_slash_and_exit_same_index(spec, state):
validator_index = spec.get_active_validator_indices(state, spec.get_current_epoch(state))[-1]
run_slash_and_exit(spec, state, validator_index, validator_index, valid=False)
yield from run_slash_and_exit(spec, state, validator_index, validator_index, valid=False)
@with_all_phases
@ -50,4 +50,4 @@ def test_slash_and_exit_same_index(spec, state):
def test_slash_and_exit_diff_index(spec, state):
slash_index = spec.get_active_validator_indices(state, spec.get_current_epoch(state))[-1]
exit_index = spec.get_active_validator_indices(state, spec.get_current_epoch(state))[-2]
run_slash_and_exit(spec, state, slash_index, exit_index)
yield from run_slash_and_exit(spec, state, slash_index, exit_index)

View File

@ -34,6 +34,7 @@ def create_provider(fork_name: str, handler_name: str,
if __name__ == "__main__":
phase_0_mods = {key: 'eth2spec.test.phase0.sanity.test_' + key for key in [
'blocks',
'multi_operations',
'slots',
]}
phase_1_mods = {**{key: 'eth2spec.test.phase1.sanity.test_' + key for key in [