mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 11:44:41 +00:00
valid==True for run_successful_crosslink_tests
helper
This commit is contained in:
parent
b8caa6ee85
commit
80c6c0b5f1
@ -43,7 +43,7 @@ def get_attestations_and_shard_transitions(spec, state, shard_block_dict):
|
|||||||
return attestations, shard_transitions
|
return attestations, shard_transitions
|
||||||
|
|
||||||
|
|
||||||
def run_successful_crosslink_tests(spec, state, target_len_offset_slot, valid=True):
|
def run_successful_crosslink_tests(spec, state, target_len_offset_slot):
|
||||||
state, shard, target_shard_slot = get_initial_env(spec, state, target_len_offset_slot)
|
state, shard, target_shard_slot = get_initial_env(spec, state, target_len_offset_slot)
|
||||||
init_slot = state.slot
|
init_slot = state.slot
|
||||||
|
|
||||||
@ -72,9 +72,8 @@ def run_successful_crosslink_tests(spec, state, target_len_offset_slot, valid=Tr
|
|||||||
|
|
||||||
pre_gasprice = state.shard_states[shard].gasprice
|
pre_gasprice = state.shard_states[shard].gasprice
|
||||||
pre_shard_states = state.shard_states.copy()
|
pre_shard_states = state.shard_states.copy()
|
||||||
yield from run_shard_transitions_processing(spec, state, shard_transitions, attestations, valid=valid)
|
yield from run_shard_transitions_processing(spec, state, shard_transitions, attestations)
|
||||||
|
|
||||||
if valid:
|
|
||||||
for index, shard_state in enumerate(state.shard_states):
|
for index, shard_state in enumerate(state.shard_states):
|
||||||
if index == shard:
|
if index == shard:
|
||||||
assert shard_state != pre_shard_states[index]
|
assert shard_state != pre_shard_states[index]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user