From 0b1ec723f292c116ebc7b403cc53efc5e609b15b Mon Sep 17 00:00:00 2001
From: mbraidot <mbraidot@buenosaires.gob.ar>
Date: Thu, 25 Apr 2019 15:15:41 -0300
Subject: [PATCH] =?UTF-8?q?Se=20agrega=20propiedad=20p=C3=BAblica=20al=20S?=
 =?UTF-8?q?C=20para=20saber=20la=20cantidad=20de=20proposals=20almacenadas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 solidity/Ballot.sol | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/solidity/Ballot.sol b/solidity/Ballot.sol
index f6f8367..5ab270a 100644
--- a/solidity/Ballot.sol
+++ b/solidity/Ballot.sol
@@ -40,6 +40,7 @@ contract            Ballot
     Voter[]             public      voterList;
     /// @dev Short name (up to 32 bytes)
     bytes32[]           public      proposalList;
+    uint                public      proposalListLength;
     uint[]              private     emptyuintlist;
 
     /// @notice When the SC is being deployed, you must define initial conditions. When specifying percentages they are to have been multiplied with 100 million (5% is written as 5 million, since 5% is actially 0.05).
@@ -84,9 +85,11 @@ contract            Ballot
         /// @dev add it to the end of the proposalList
         uint        incoming                =   proposalNames.length;
         uint        i                       =   0;
+        proposalListLength      =   0;
         while ( i < incoming )
         {
             proposalList.push( proposalNames[i] );
+            proposalListLength++;
             i++;
         }
     }
-- 
GitLab