The LevelOne::startSession
function sets the inSession
flag to true
to indicate the start of a school term. However, no function in either LevelOne or LevelTwo resets inSession
to false
, even after graduation. As a result, once a session starts, the contract remains stuck in an "active session" state, permanently preventing future sessions or student enrollments.
One-Way State Transition
Once inSession
is set to true
, it remains true indefinitely unless explicitly reset.
No Session Reset Logic
Neither graduateAndUpgrade
in LevelOne nor graduate()
in LevelTwo resets this flag, leaving the contract stuck in "session in progress".
Enrollment and Session Initiation Blocked
The notYetInSession
modifier prevents startSession
from being called again, blocking future school terms and new student enrollments.
Denial of Functionality: Only one session can ever occur.
Enrollment Frozen: No new students can enroll in future terms.
Protocol Halt: The core lifecycle of the school system is broken after a single use.
Manual Code Review
inSession
in LevelTwo::graduate()
If the graduation and reward logic is now handled in LevelTwo
, the proper place to reset inSession
is at the end of the graduate()
function:
inSession
in LevelOne::graduateAndUpgrade()
If the graduation logic still resides in LevelOne, you can reset the session flag at the end of graduateAndUpgrade
:
endSession()
Admin FunctionIf you want to keep session control flexible, consider exposing a dedicated function:
`inSession` not updated after during upgrade
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.