WebdevteamIG / blockchainvoting

1 stars 3 forks source link

Update Voting.sol #24

Closed dheerajd5 closed 3 years ago

dheerajd5 commented 3 years ago

24

We can use the block chain in this way right, cause if you get the details of a candidate, you get the subsequent details of the rest of the candidates. Is this the right way to solve the issue, or am I doing something wrong?

saitejach127 commented 3 years ago

Can you tag which issue are you solving

dheerajd5 commented 3 years ago

Can you tag which issue are you solving

Sorry for the inconvience, #22

saitejach127 commented 3 years ago

Your pr is good but works only if one candidate is there. But there will be many candidates normally. So an array of candidates will be passed to the constructor. That needs to be set as candidates. Make these changes

dheerajd5 commented 3 years ago

Will these array of candidates passed into constructor include the names and the cross checking of whether the names repeat?

saitejach127 commented 3 years ago

I think no need of cross checking for now. Duplictes mostly wont be there. Also candidates names only will be passed

dheerajd5 commented 3 years ago

If there passed array will have the names, we can just directly assign the list to the class variable, like I did now right?

saitejach127 commented 3 years ago

Ya directly assigning will be enough