InitialRate must be strictly larger than finalRate. (#1441)

This commit is contained in:
Nicolás Venturo
2018-10-19 15:37:24 -03:00
committed by Leo Arias
parent 1ac1ac984e
commit a936cbf5fb
2 changed files with 21 additions and 3 deletions

View File

@ -22,11 +22,19 @@ contract IncreasingPriceCrowdsale is TimedCrowdsale {
*/
constructor(uint256 initialRate, uint256 finalRate) internal {
require(finalRate > 0);
require(initialRate >= finalRate);
require(initialRate > finalRate);
_initialRate = initialRate;
_finalRate = finalRate;
}
/**
* The base rate function is overridden to revert, since this crowdsale doens't use it, and
* all calls to it are a mistake.
*/
function rate() public view returns(uint256) {
revert();
}
/**
* @return the initial rate of the crowdsale.
*/