support k=0 case and fix test

This commit is contained in:
mingda
2020-12-01 00:02:33 +08:00
parent e5c24453bb
commit 167634cd0c
6 changed files with 149 additions and 17 deletions

View File

@@ -127,7 +127,7 @@ contract DPPStorage is InitializableOwnable, ReentrancyGuard {
function _checkIK() internal view {
uint256 k = _K_.get();
uint256 i = _I_.get();
require(k > 0 && k <= 1e18, "K_OUT_OF_RANGE");
require(k <= 1e18, "K_OUT_OF_RANGE");
require(i > 0 && i <= 1e36, "I_OUT_OF_RANGE");
}
}