InitialRate must be strictly larger than finalRate. (#1441)
This commit is contained in:
committed by
Leo Arias
parent
1ac1ac984e
commit
a936cbf5fb
@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user