Skip to content

Throw exceptions in unreachable branches instead of having no-op #111

Description

@anton-trunov

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions