new loans "max duration" is not restricted
document : " Epochs PublicVaults operate around a time-based epoch system. An epoch length is defined by the strategist that deploys the PublicVault. The duration of new loans is restricted to not exceed the end of the next epoch. For example, if a PublicVault is 15 days into a 30-day epoch, new loans must not be longer than 45 days. " but more than 2 epoch's duration can be added\\nthe max duration is not detected. add success when > next epoch\\n#AstariaTest#testBasicPublicVaultLoan\\n```\\n  function testBasicPublicVaultLoan() public {\\n\\n  IAstariaRouter.LienDetails memory standardLien2 =\\n    IAstariaRouter.LienDetails({\\n      maxAmount: 50 ether,\\n      rate: (uint256(1e16) * 150) / (365 days),\\n      duration: 50 days,  /****** more then 14 * 2 *******/\\n      maxPotentialDebt: 50 ether\\n    });    \\n\\n    _commitToLien({\\n      vault: publicVault,\\n      strategist: strategistOne,\\n      strategistPK: strategistOnePK,\\n      tokenContract: tokenContract,\\n      tokenId: tokenId,\\n      lienDetails: standardLien2, /**** use standardLien2 ****/\\n      amount: 10 ether,\\n      isFirstLien: true\\n    });\\n  }\\n```\\n
PublicVault#_afterCommitToLien\\n```\\n  function _afterCommitToLien(uint256 lienId, uint256 amount)\\n    internal\\n    virtual\\n    override\\n  {\\n    // increment slope for the new lien\\n    unchecked {\\n      slope += LIEN_TOKEN().calculateSlope(lienId);\\n    }\\n\\n    ILienToken.Lien memory lien = LIEN_TOKEN().getLien(lienId);\\n\\n    uint256 epoch = Math.ceilDiv(\\n      lien.start + lien.duration - START(),\\n      EPOCH_LENGTH()\\n    ) - 1;\\n\\n+   require(epoch <= currentEpoch + 1,"epoch max <= currentEpoch + 1");\\n\\n    liensOpenForEpoch[epoch]++;\\n    emit LienOpen(lienId, epoch);\\n  }\\n```\\n
Too long duration
```\\n  function testBasicPublicVaultLoan() public {\\n\\n  IAstariaRouter.LienDetails memory standardLien2 =\\n    IAstariaRouter.LienDetails({\\n      maxAmount: 50 ether,\\n      rate: (uint256(1e16) * 150) / (365 days),\\n      duration: 50 days,  /****** more then 14 * 2 *******/\\n      maxPotentialDebt: 50 ether\\n    });    \\n\\n    _commitToLien({\\n      vault: publicVault,\\n      strategist: strategistOne,\\n      strategistPK: strategistOnePK,\\n      tokenContract: tokenContract,\\n      tokenId: tokenId,\\n      lienDetails: standardLien2, /**** use standardLien2 ****/\\n      amount: 10 ether,\\n      isFirstLien: true\\n    });\\n  }\\n```\\n