File tree Expand file tree Collapse file tree
packages/testing/src/consensus_testing
tests/consensus/lstar/state_transition Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def generate(self) -> StateTransitionFixture:
116116
117117 if cached_state is not None :
118118 state = cached_state
119- elif block_spec .skip_slot_processing :
119+ elif block_spec .skip_slot_processing and not block_spec . check_state_transition :
120120 state = spec .process_block (state , block )
121121 else :
122122 state = spec .state_transition (state , block = block )
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ class BlockSpec(CamelModel):
7171 skip_slot_processing : bool = False
7272 """Skip automatic slot advancement before processing, to exercise slot-mismatch failures."""
7373
74+ check_state_transition : bool = False
75+ """Call `state_transition` after block is generated by `_build_block_from_spec`."""
76+
7477 def resolve_proposer_index (self , num_validators : int ) -> ValidatorIndex :
7578 """Return the proposer index, falling back to the spec's round-robin schedule."""
7679 if self .proposer_index is not None :
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ def test_process_slots_target_equal_to_state_slot_rejected(
3939 state_transition_test (
4040 pre = pre_state ,
4141 blocks = [
42- BlockSpec (slot = Slot (1 )),
42+ BlockSpec (
43+ slot = Slot (1 ),
44+ skip_slot_processing = True ,
45+ check_state_transition = True ,
46+ ),
4347 ],
4448 post = None ,
4549 expected_rejection = ExpectedRejection (
You can’t perform that action at this time.
0 commit comments