mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix comment position in the voting example
This commit is contained in:
parent
9b220a2007
commit
811fa193af
@ -129,14 +129,16 @@ of votes.
|
|||||||
require(to != msg.sender, "Found loop in delegation.");
|
require(to != msg.sender, "Found loop in delegation.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since `sender` is a reference, this
|
|
||||||
// modifies `voters[msg.sender].voted`
|
|
||||||
Voter storage delegate_ = voters[to];
|
Voter storage delegate_ = voters[to];
|
||||||
|
|
||||||
// Voters cannot delegate to accounts that cannot vote.
|
// Voters cannot delegate to accounts that cannot vote.
|
||||||
require(delegate_.weight >= 1);
|
require(delegate_.weight >= 1);
|
||||||
|
|
||||||
|
// Since `sender` is a reference, this
|
||||||
|
// modifies `voters[msg.sender]`.
|
||||||
sender.voted = true;
|
sender.voted = true;
|
||||||
sender.delegate = to;
|
sender.delegate = to;
|
||||||
|
|
||||||
if (delegate_.voted) {
|
if (delegate_.voted) {
|
||||||
// If the delegate already voted,
|
// If the delegate already voted,
|
||||||
// directly add to the number of votes
|
// directly add to the number of votes
|
||||||
|
Loading…
Reference in New Issue
Block a user