@@ -45,11 +45,9 @@ contract VestedToken is StandardToken, LimitedTransferToken {
...
@@ -45,11 +45,9 @@ contract VestedToken is StandardToken, LimitedTransferToken {
) public {
) public {
// Check for date inconsistencies that may cause unexpected behavior
// Check for date inconsistencies that may cause unexpected behavior
if (_cliff < _start || _vesting < _cliff) {
require(_cliff >= _start && _vesting >= _cliff);
throw;
}
if (tokenGrantsCount(_to) > MAX_GRANTS_PER_ADDRESS) throw; // To prevent a user being spammed and have his balance locked (out of gas attack when calculating vesting).
require(tokenGrantsCount(_to) <= MAX_GRANTS_PER_ADDRESS); // To prevent a user being spammed and have his balance locked (out of gas attack when calculating vesting).
uint256 count = grants[_to].push(
uint256 count = grants[_to].push(
TokenGrant(
TokenGrant(
...
@@ -76,13 +74,8 @@ contract VestedToken is StandardToken, LimitedTransferToken {
...
@@ -76,13 +74,8 @@ contract VestedToken is StandardToken, LimitedTransferToken {
function revokeTokenGrant(address _holder, uint256 _grantId) public {
function revokeTokenGrant(address _holder, uint256 _grantId) public {
TokenGrant grant = grants[_holder][_grantId];
TokenGrant grant = grants[_holder][_grantId];
if (!grant.revokable) { // Check if grant was revokable
require(grant.revokable);
throw;
require(grant.granter == msg.sender); // Only granter can revoke it
}
if (grant.granter != msg.sender) { // Only granter can revoke it