Function: registerAccountWeight(address account, uint256 minWeeks)
Record the current lock weights for account, which can then be used to vote.
Inputs
accountControl: Controlled by the user.
Constraints: N/A.
Impact: The voting power of this account is registered.
minWeeksControl: Controlled by the user.
Constraints: Must be a nonnegative integer.
Impact: The minimum number of weeks-to-unlock to record weights for.
Branches and code coverage (including function calls)
Intended branches
Successful with recording for an account.
Negative behavior
Test with an account that has no active locks.
Function call analysis
registerAccountWeight -> _registerAccountWeight -> tokenLocker.getAccountActiveLocks(account,minWeeks)What is controllable?
accountandminWeeks.If return value controllable, how is it used and how can it go wrong? These variables are subsequently used to adjust the state of
accountData. If the return values are manipulated, the state ofaccountDatacould be set improperly. For instance, if the return value for frozen is manipulated to a high value, thefrozenWeightinaccountDatamay be set to an unjustifiably high value.What happens if it reverts, reenters, or does other unusual control flow? N/A.