test invalid shard in attestation

This commit is contained in:
protolambda 2019-06-22 01:47:53 +02:00
parent 13b67b4cde
commit 327953852d
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 14 additions and 0 deletions

View File

@ -148,6 +148,20 @@ def test_wrong_shard(spec, state):
yield from run_attestation_processing(spec, state, attestation, False) yield from run_attestation_processing(spec, state, attestation, False)
@with_all_phases
@spec_state_test
def test_invalid_shard(spec, state):
attestation = get_valid_attestation(spec, state)
state.slot += spec.MIN_ATTESTATION_INCLUSION_DELAY
# off by one (with respect to valid range) on purpose
attestation.data.crosslink.shard = spec.SHARD_COUNT
sign_attestation(spec, state, attestation)
yield from run_attestation_processing(spec, state, attestation, False)
@with_all_phases @with_all_phases
@spec_state_test @spec_state_test
def test_new_source_epoch(spec, state): def test_new_source_epoch(spec, state):