Merge pull request #26 from 67P/features/batch-voting

Add batch voting for proposals
This commit is contained in:
fsmanuel 2018-04-24 12:40:15 +00:00 committed by GitHub
commit 6949a5940a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,14 @@ contract Operator is Upgradeable {
ProposalVoted(proposalId, voterId, p.votesCount);
}
function batchVote(uint256[] _proposalIds) public coreOnly {
for (uint256 i = 0; i < _proposalIds.length; i++) {
vote(_proposalIds[i]);
}
}
function executeProposal(uint proposalId) private {
var p = proposals[proposalId];
require(!p.executed);
require(p.votesCount >= p.votesNeeded);