From 7d3147d418e320c0b433d9de872f8b4dad0d5186 Mon Sep 17 00:00:00 2001 From: protolambda Date: Wed, 22 May 2019 04:19:54 +0200 Subject: [PATCH] add inconsistent bitfields test --- .../block_processing/test_process_attestation.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test_libs/pyspec/eth2spec/test/block_processing/test_process_attestation.py b/test_libs/pyspec/eth2spec/test/block_processing/test_process_attestation.py index 9491ee001..0dae852f0 100644 --- a/test_libs/pyspec/eth2spec/test/block_processing/test_process_attestation.py +++ b/test_libs/pyspec/eth2spec/test/block_processing/test_process_attestation.py @@ -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)