Skip to content

Conversation

@gaultierq
Copy link

No description provided.

*/
function recordContribution(address _user, uint _amount) {
require(contribution[_user] + _amount >= contribution[_user]);
require(totalContributions + _amount >= totalContributions);
Copy link

@n1c01a5 n1c01a5 Apr 24, 2017

Choose a reason for hiding this comment

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

I don't sure the second check is necessary. If the first test is okay, the input amount is a valid number.
Your overflow check is good idea but I think there is an another issue.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants