Skip to content

Commit

Permalink
Merge pull request #71 from Adrion/patch-1
Browse files Browse the repository at this point in the history
Prevent setEndsAt before startsAt
  • Loading branch information
miohtama committed Oct 27, 2017
2 parents fbb2401 + 248cda5 commit 37c1e1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/Crowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ contract Crowdsale is Haltable {
if(now > time) {
throw; // Don't change past
}

if(startsAt > time) {
throw; // Prevent human mistakes
}

endsAt = time;
EndsAtChanged(endsAt);
Expand Down

0 comments on commit 37c1e1e

Please sign in to comment.