staking-contract
staking-contract copied to clipboard
Throw exceptions in unreachable branches instead of having no-op
There is a couple of unreachable branches in the code with comment like won't reach
and no-ops. It's safer against future changes to insert throw
instructions instead of no-op as in this case if the invariant is violated the state changes will be reverted.
See CalculateTotalWithdrawal
and WithdrawalStakeRewards
procedures.
OK, will do that!