_updateWithdrawalQueue can run out of gas
When there's not enough collateral to withdraw liquidity from a policy book, the withdrawal request is added to a queue. The queue is supposed to be processed and cleared once there are enough funds for that. The only way to do so is the `_updateWithdrawalQueue` function that is caller when new liquidity is added:\\n```\\nfunction \\_updateWithdrawalQueue() internal {\\n  uint256 \\_availableLiquidity = totalLiquidity.sub(totalCoverTokens);\\n  uint256 \\_countToRemoveFromQueue;\\n\\n  for (uint256 i = 0; i < withdrawalQueue.length; i++) {     \\n    uint256 \\_tokensToWithdraw = withdrawalsInfo[withdrawalQueue[i]].amount;\\n    uint256 \\_amountInDai = \\_tokensToWithdraw.mul(getDAIToDAIxRatio()).div(PERCENTAGE\\_100);\\n\\n    if (balanceOf(withdrawalQueue[i]) < \\_tokensToWithdraw) {\\n      \\_countToRemoveFromQueue++;\\n      continue;\\n    }\\n\\n    if (\\_availableLiquidity >= \\_amountInDai) {\\n      \\_withdrawLiquidity(withdrawalQueue[i], \\_tokensToWithdraw);\\n      \\_availableLiquidity = \\_availableLiquidity.sub(\\_amountInDai);\\n      \\_countToRemoveFromQueue++;\\n    } else {\\n      break;\\n    }\\n  }\\n\\n  \\_removeFromQueue(\\_countToRemoveFromQueue);\\n}\\n```\\n\\nThe problem is that this function can only process all queue until the pool run out of available funds or the whole queue is going to be processed. If the queue is big enough, this process can be stuck.
Pass the parameter to the `_updateWithdrawalQueue` that defines how many requests to process in the queue per one call.
```\\nfunction \\_updateWithdrawalQueue() internal {\\n  uint256 \\_availableLiquidity = totalLiquidity.sub(totalCoverTokens);\\n  uint256 \\_countToRemoveFromQueue;\\n\\n  for (uint256 i = 0; i < withdrawalQueue.length; i++) {     \\n    uint256 \\_tokensToWithdraw = withdrawalsInfo[withdrawalQueue[i]].amount;\\n    uint256 \\_amountInDai = \\_tokensToWithdraw.mul(getDAIToDAIxRatio()).div(PERCENTAGE\\_100);\\n\\n    if (balanceOf(withdrawalQueue[i]) < \\_tokensToWithdraw) {\\n      \\_countToRemoveFromQueue++;\\n      continue;\\n    }\\n\\n    if (\\_availableLiquidity >= \\_amountInDai) {\\n      \\_withdrawLiquidity(withdrawalQueue[i], \\_tokensToWithdraw);\\n      \\_availableLiquidity = \\_availableLiquidity.sub(\\_amountInDai);\\n      \\_countToRemoveFromQueue++;\\n    } else {\\n      break;\\n    }\\n  }\\n\\n  \\_removeFromQueue(\\_countToRemoveFromQueue);\\n}\\n```\\n