I have verified that the mitigation steps are working correctly by deliberately inputting a less than 2 weeks duration to make sure that createMinipool() would revert with a DurationOutOfBounds() error:
function testCreateAndGetMany() public {
address nodeID;
uint256 avaxAssignmentRequest = 1000 ether;
for (uint256 i = 0; i < 10; i++) {
nodeID = randAddress();
vm.startPrank(nodeOp);
ggp.approve(address(staking), 100 ether);
staking.stakeGGP(100 ether);
- minipoolMgr.createMinipool{value: 1000 ether}(nodeID, 14 days, 0.02 ether, avaxAssignmentRequest);
+ minipoolMgr.createMinipool{value: 1000 ether}(nodeID, 13 days, 0.02 ether, avaxAssignmentRequest);
vm.stopPrank();
}
index = minipoolMgr.getIndexOf(nodeID);
assertEq(index, 9);
}
As seen below, it will revert with a DurationOutOfBounds() error:
I have verified that the mitigation steps are working correctly by deliberately inputting a less than
2 weeks
duration to make sure thatcreateMinipool()
would revert with aDurationOutOfBounds()
error:As seen below, it will revert with a
DurationOutOfBounds()
error: