fix incentive
This commit is contained in:
@@ -48,13 +48,13 @@ contract DODOIncentive is InitializableOwnable {
|
||||
function switchIncentive(uint256 _startBlock) public onlyOwner {
|
||||
if(startBlock != 0) {
|
||||
require(block.number >= startBlock);
|
||||
_update();
|
||||
startBlock = 0;
|
||||
}else {
|
||||
require(block.number <= _startBlock);
|
||||
require(block.number <= _startBlock && _startBlock < uint32(-1));
|
||||
startBlock = _startBlock;
|
||||
lastRewardBlock = startBlock;
|
||||
lastRewardBlock = uint32(_startBlock);
|
||||
}
|
||||
_update();
|
||||
emit SetSwitch(startBlock == 0 ? false: true);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,19 +104,11 @@ describe("DODOProxyV2.0", () => {
|
||||
|
||||
describe("DODOIncentive", () => {
|
||||
|
||||
it("incentive-switch", async () => {
|
||||
it("incentive-switch with trade", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("incentive-changeBoost", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("incentive-changeDefaultRate", async () => {
|
||||
|
||||
});
|
||||
|
||||
it("incentive-emptyReward", async () => {
|
||||
it("incentive-changeBoost with trade", async () => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user