totalDuration
must equal the sum of all elapsed durations between updates but this can be broken.
totalDuration
is initialized to the period's initial duration in createPeriod
, then incremented by update intervals in updateValue
. This causes totalDuration
to exceed the actual period duration (endTime - startTime
)
totalDuration
must equal the actual elapsed time of the period (endTime - startTime
).
totalDuration
is initialized to the initial duration (e.g., 100 seconds).
Every call to updateValue
adds the time since the last update to totalDuration
.
This causes totalDuration
to exceed the actual period duration (endTime - startTime
).
startTime = 0
endTime = 100
(duration = 100 seconds)
totalDuration
initialized to 100
.
t=50
:duration = 50 - 0 = 50
totalDuration
becomes 100 + 50 = 150
.
t=100
:duration = 100 - 50 = 50
totalDuration
becomes 150 + 50 = 200
.
Actual period duration: 100
seconds (endTime - startTime
).
totalDuration
incorrectly reports 200
seconds.
Valid new periods are incorrectly rejected
Manual Review
totalDuration
should only track the initial duration (endTime - startTime
).
Time between updates should be tracked separately (e.g., elapsedTime
).
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.