This commit is contained in:
Richard Ramos 2018-08-20 14:52:42 -04:00 committed by GitHub
parent c3a29f4aa5
commit a300b7675b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ if (b == Ballot.UPVOTE) {
} else {
p.downvotes++;
}
l.voters[msg.sender] = b;
p.voters[msg.sender] = b;
```
3. Emit the event
@ -71,4 +71,4 @@ It's possible an user would like to know what was his choice on a previously vot
Post storage p = posts[_postId];
return uint8(p.voters[msg.sender]);
```
> Notice that on the last two functions, the input and output values related to votes are uin8 instead of an enum. Enum are not a valid input/output value for functions at least on the current solidity version.
> Notice that on the last two functions, the input and output values related to votes are uin8 instead of an enum. Enum are not a valid input/output value for functions at least on the current solidity version.