Skip to content

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

@anton-trunov

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions