Updating s_earnTimer
must happen only in earnSnow
function
Currently the it's updated and when a user is buying Snow
in buySnow
Likelihood: High
This occurs every time a user is buying snow via buySnow
Impact: High
When buySnow
is called the timer is updates incorrectly, because of this the earnSnow
function cannot serve it's purpose
actors:
ashley
- regular snow collector
jerry
- a snow buyer
ashley
collects Snow
successfuly
2.After 5 days jerry decides to buy some snow (just for fun unknowing or knowing this action will break the contract).
Failing test:
Removing the line that updates the s_earnTimer
will solve the problem.
When buySnow is successfully called, the global timer is reset. This inadvertently affects the earning of snow as that particular action also depends on the global timer.
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.