Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Court: Add checks to ensure dispute and round exist #62

Closed
bingen opened this issue Jul 10, 2019 · 0 comments · Fixed by #170
Closed

Court: Add checks to ensure dispute and round exist #62

bingen opened this issue Jul 10, 2019 · 0 comments · Fixed by #170
Assignees
Labels
1st audit freeze component:contracts Contracts related requirements enhancement New enhancement request
Milestone

Comments

@bingen
Copy link
Contributor

bingen commented Jul 10, 2019

In most functions we are doing:

        Dispute storage dispute = disputes[_disputeId];

Since this is a mapping, should we check that the dispute actually exists? (Downside being adding more code, of course)

The same for:

        AdjudicationRound storage round = dispute.rounds[_roundId];

In a lot of them we are then doing too:

        AdjudicationRound storage round = dispute.rounds[dispute.rounds.length - 1];

Which would fail because rounds length is zero, but it would be nice to have a proper error message.

@bingen bingen changed the title Check dispute exists Check dispute and round exist Aug 1, 2019
@facuspagnuolo facuspagnuolo added component:contracts Contracts related requirements enhancement New enhancement request labels Aug 6, 2019
@facuspagnuolo facuspagnuolo changed the title Check dispute and round exist Court: Add checks to ensure dispute and round exist Sep 19, 2019
@facuspagnuolo facuspagnuolo self-assigned this Oct 9, 2019
@izqui izqui added this to the Freeze #1 milestone Oct 15, 2019
facuspagnuolo added a commit that referenced this issue Oct 12, 2020
* disputes: add penalties settled timestamp

* disputes: add juror draft settled penalties date

* disputes: add juror rewarded date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1st audit freeze component:contracts Contracts related requirements enhancement New enhancement request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants