Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Updated votingDeadline variable to minExecutionDate (#818)
Browse files Browse the repository at this point in the history
* Updated votingDeadline variable to minExecutionDate

* Update dao-congress.sol
  • Loading branch information
ShubhamTatvamasi authored and alexvansande committed Apr 5, 2018
1 parent a003c9f commit 574c949
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions solidity/dao-congress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ contract Congress is owned, tokenRecipient {
address recipient;
uint amount;
string description;
uint votingDeadline;
uint minExecutionDate;
bool executed;
bool proposalPassed;
uint numberOfVotes;
Expand Down Expand Up @@ -182,7 +182,7 @@ contract Congress is owned, tokenRecipient {
p.amount = weiAmount;
p.description = jobDescription;
p.proposalHash = keccak256(beneficiary, weiAmount, transactionBytecode);
p.votingDeadline = now + debatingPeriodInMinutes * 1 minutes;
p.minExecutionDate = now + debatingPeriodInMinutes * 1 minutes;
p.executed = false;
p.proposalPassed = false;
p.numberOfVotes = 0;
Expand Down Expand Up @@ -253,8 +253,8 @@ contract Congress is owned, tokenRecipient {
onlyMembers public
returns (uint voteID)
{
Proposal storage p = proposals[proposalNumber]; // Get the proposal
require(!p.voted[msg.sender]); // If has already voted, cancel
Proposal storage p = proposals[proposalNumber]; // Get the proposal
require(!p.voted[msg.sender]); // If has already voted, cancel
p.voted[msg.sender] = true; // Set this voter as having voted
p.numberOfVotes++; // Increase the number of votes
if (supportsProposal) { // If they support the proposal
Expand All @@ -279,7 +279,7 @@ contract Congress is owned, tokenRecipient {
function executeProposal(uint proposalNumber, bytes transactionBytecode) public {
Proposal storage p = proposals[proposalNumber];

require(now > p.votingDeadline // If it is past the voting deadline
require(now > p.minExecutionDate // If it is past the voting deadline
&& !p.executed // and it has not already been executed
&& p.proposalHash == keccak256(p.recipient, p.amount, transactionBytecode) // and the supplied code matches the proposal
&& p.numberOfVotes >= minimumQuorum); // and a minimum quorum has been reached...
Expand Down

0 comments on commit 574c949

Please sign in to comment.