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

TOB-LQT-013: Make trove reinsertion revert if ICR == 0 #212

Merged
merged 2 commits into from
Jan 7, 2021
Merged

Conversation

RickGriff
Copy link
Collaborator

Fixes #204

@RickGriff RickGriff changed the title Make trove reinsertion revert if ICR == 0 TOB-LQT-013: Make trove reinsertion revert if ICR == 0 Jan 5, 2021
@RickGriff RickGriff added audit Issues detected in the December audit by Trail of Bits backend labels Jan 5, 2021
@RickGriff RickGriff self-assigned this Jan 5, 2021
@RickGriff RickGriff requested a review from bingen January 6, 2021 11:03
Copy link
Collaborator

@bingen bingen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just one minor comment inline.

_insert(_id, _newICR, _price, _prevId, _nextId);
}
//Require non-zero ICR
require(_newICR > 0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should have the message SortedTroves: ICR must be positive. Due to infamous issue #99, we are not checking revert messages, but once we fix it, the test for this would fail.

@RickGriff RickGriff merged commit df289a9 into main Jan 7, 2021
@RickGriff RickGriff deleted the tob_013 branch January 7, 2021 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Issues detected in the December audit by Trail of Bits backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TOB-LQT-013: Troves can be improperly removed under certain circumstances which results in unexpected reverts
2 participants