aboutsummaryrefslogtreecommitdiffstats
path: root/docs/solidity-by-example.rst
diff options
context:
space:
mode:
authorJim McDonald <Jim@mcdee.net>2017-12-13 15:55:46 +0800
committerJim McDonald <Jim@mcdee.net>2017-12-13 15:55:46 +0800
commit93cf4dee666e01d6907c75c4018a701e5069daad (patch)
tree8c3732c7a5961c00bee6adb3f916b99744c65bf7 /docs/solidity-by-example.rst
parent6e521d59b0a30fa0673aaf84559d5b74dbb1eed7 (diff)
downloaddexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.gz
dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.tar.zst
dexon-solidity-93cf4dee666e01d6907c75c4018a701e5069daad.zip
Fixes for failing tests
Diffstat (limited to 'docs/solidity-by-example.rst')
-rw-r--r--docs/solidity-by-example.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst
index 6c01278a..b663083c 100644
--- a/docs/solidity-by-example.rst
+++ b/docs/solidity-by-example.rst
@@ -158,9 +158,9 @@ of votes.
returns (uint winningProposal)
{
uint winningVoteCount = 0;
- for (uint p = 0; p < winningProposals.length; p++) {
- if (winningProposals[p].voteCount > winningVoteCount) {
- winningVoteCount = winningProposals[p].voteCount;
+ for (uint p = 0; p < proposals.length; p++) {
+ if (proposals[p].voteCount > winningVoteCount) {
+ winningVoteCount = proposals[p].voteCount;
winningProposal = p;
}
}
@@ -172,7 +172,7 @@ of votes.
function winnerName() public view
returns (bytes32 winnerName)
{
- name = proposals[winningProposal()].name;
+ winnerName = proposals[winningProposal()].name;
}
}