The SignatureValidatorV2.recoverAddrImpl function currently uses three if (mode == *) checks but the modes are all distinct enum values and therefore an else if can be used.
This is more efficient because if the first branch is already matched, there's no need to check the mode against the remaining values anymore.
Handle
cmichel
Vulnerability details
The
SignatureValidatorV2.recoverAddrImpl
function currently uses threeif (mode == *)
checks but the modes are all distinct enum values and therefore anelse if
can be used. This is more efficient because if the first branch is already matched, there's no need to check themode
against the remaining values anymore.