Expand description
State machine validation.
Enforces valid state transitions for account lifecycle enums. Prevents invalid state jumps (e.g., Pending -> Closed skipping Active).
Functionsยง
- check_
state - Check that the state byte at
offsetindatamatchesexpected. - check_
state_ in - Check that the state byte at
offsetis in theallowedset. - check_
state_ not - Check that the state byte at
offsetis NOTrejected. - check_
state_ transition - Check that a state transition is valid.
- transition_
state - Write a new state byte at
offset, validating the transition.