mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #5314 from berkerol/patch-1
DOCS: Add check for whether voter has right to vote
This commit is contained in:
		
						commit
						c84003533f
					
				| @ -152,6 +152,7 @@ of votes. | ||||
|         /// to proposal `proposals[proposal].name`. | ||||
|         function vote(uint proposal) public { | ||||
|             Voter storage sender = voters[msg.sender]; | ||||
|             require(sender.weight != 0, "Has no right to vote"); | ||||
|             require(!sender.voted, "Already voted."); | ||||
|             sender.voted = true; | ||||
|             sender.vote = proposal; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user