From df4807c782eacb8e23d4bf5015410d81787bc801 Mon Sep 17 00:00:00 2001
From: mbraidot <mbraidot@buenosaires.gob.ar>
Date: Mon, 29 Apr 2019 17:10:06 -0300
Subject: [PATCH] =?UTF-8?q?Se=20agregab=20m=C3=A9todos=20al=20SC=20para=20?=
 =?UTF-8?q?obtener=20las=20proposals=20votadas=20por=20un=20votante?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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

diff --git a/solidity/Ballot.sol b/solidity/Ballot.sol
index 1998d57..c3679fa 100644
--- a/solidity/Ballot.sol
+++ b/solidity/Ballot.sol
@@ -166,6 +166,22 @@ contract            Ballot
         voterList[uidx].votedProposals.push( proposal );
     }
 
+    function getVotesCountByIdx( uint idx ) 
+        public 
+        view 
+        returns(int)
+    {
+        return int(voterList[idx].votedProposals.length);
+    }
+
+    function getVotedProposalByVoter( uint idx, uint idp )
+        public 
+        view 
+        returns ( int )
+    {
+        return int(voterList[idx].votedProposals[idp]);
+    }
+
     function uncreate()
         public
     {
-- 
GitLab