Merge pull request #1323 from varunagarwal315/patch-1

Update solidity-by-example.rst
This commit is contained in:
Yoichi Hirai 2016-11-04 10:55:03 +01:00 committed by GitHub
commit d97d267a96

View File

@ -170,6 +170,15 @@ of votes.
}
}
}
// Calls winningProposal() function to get the index
// of the winner contained in the proposals array and then
// returns the name of the winner
function winnerName() constant
returns (bytes32 winnerName)
{
winnerName = proposals[winningProposal()].name;
}
}
Possible Improvements