add inconsistent bitfields test

This commit is contained in:
protolambda 2019-05-22 04:19:54 +02:00
parent a4363ba096
commit 7d3147d418
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 12 additions and 0 deletions

View File

@ -219,6 +219,18 @@ def test_bad_previous_crosslink(state):
yield from run_attestation_processing(state, attestation, False)
@spec_state_test
def test_inconsistent_bitfields(state):
attestation = get_valid_attestation(state, signed=False)
state.slot += spec.MIN_ATTESTATION_INCLUSION_DELAY
attestation.custody_bitfield = deepcopy(attestation.aggregation_bitfield) + b'\x00'
sign_attestation(state, attestation)
yield from run_attestation_processing(state, attestation, False)
@spec_state_test
def test_non_empty_custody_bitfield(state):
attestation = get_valid_attestation(state, signed=False)