Merge pull request #2429 from DillonBArevalo/fix-voting

Add weight == 0 condition to giveRightToVote function
This commit is contained in:
chriseth 2017-06-21 17:54:55 +02:00 committed by GitHub
commit ac977cdffa

View File

@ -94,7 +94,7 @@ of votes.
// called incorrectly. But watch out, this
// will currently also consume all provided gas
// (this is planned to change in the future).
require((msg.sender == chairperson) && !voters[voter].voted);
require((msg.sender == chairperson) && !voters[voter].voted && (voters[voter].weight == 0));
voters[voter].weight = 1;
}