fix v1.1.0-alpha.1 generators

This commit is contained in:
Danny Ryan 2021-03-17 10:14:59 -06:00
parent 3ce090f4be
commit 1707978189
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 11 additions and 15 deletions

View File

@ -68,8 +68,6 @@ def test_invalid_signature_missing_participant(spec, state):
rng = random.Random(2020)
random_participant = rng.choice(committee)
yield 'pre', state
block = build_empty_block_for_next_slot(spec, state)
# Exclude one participant whose signature was included.
block.body.sync_aggregate = spec.SyncAggregate(
@ -168,8 +166,6 @@ def validate_sync_committee_rewards(spec, pre_state, post_state, committee, comm
def run_successful_sync_committee_test(spec, state, committee, committee_bits):
yield 'pre', state
pre_state = state.copy()
block = build_empty_block_for_next_slot(spec, state)
@ -211,17 +207,6 @@ def test_sync_committee_rewards_nonduplicate_committee(spec, state):
yield from run_successful_sync_committee_test(spec, state, committee, committee_bits)
@with_all_phases_except([PHASE0, PHASE1])
@spec_state_test
@always_bls
def test_sync_committee_rewards_not_full_participants(spec, state):
committee = get_committee_indices(spec, state, duplicates=False)
rng = random.Random(1010)
committee_bits = [rng.choice([True, False]) for _ in committee]
yield from run_successful_sync_committee_test(spec, state, committee, committee_bits)
@with_all_phases_except([PHASE0, PHASE1])
@with_configs([MAINNET], reason="to create duplicate committee")
@spec_state_test
@ -238,6 +223,17 @@ def test_sync_committee_rewards_duplicate_committee(spec, state):
yield from run_successful_sync_committee_test(spec, state, committee, committee_bits)
@with_all_phases_except([PHASE0, PHASE1])
@spec_state_test
@always_bls
def test_sync_committee_rewards_not_full_participants(spec, state):
committee = spec.get_sync_committee_indices(state, spec.get_current_epoch(state))
rng = random.Random(1010)
committee_bits = [rng.choice([True, False]) for _ in committee]
yield from run_successful_sync_committee_test(spec, state, committee, committee_bits)
@with_all_phases_except([PHASE0, PHASE1])
@spec_state_test
@always_bls