According to the information provided relating to this function on the firstflight page. The checkTwice is expected to revert in a situation where the address passed into function does not exist in the s_theListCheckedOnce mapping. That is, an address should only be checked twice if it has been checked once.
The current state of the function as shown below only ensures that the status passed in the function is same as the status it was before. While the intented purpose of the function is to change the status only on the condition that it has been checked once.
The test below also shows that the function does not fail when it has not been checked once:
The impact of this is that it doesn't follow the intended business logic which requires that all addresses are checked twice and also in a situation where a given address has been given a status it cannot be changed in the checkTwice function.
Manual review
Make a provision in the function to make sure that the function fails in a situation where an address has not been checked once and also remove the checks that restrict the status from been changed in the checkTwice function. Below is a recommended change that can be implemented
Also, the test below shows that it reverts when a random address which has not been checked is entered in checkTwice:
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.