_endingDelegations list is redundant
`_endingDelegations` is a list of delegations that is created for optimisation purposes. But the only place it's used is in `getPurchasedAmount` function, so only a subset of all delegations is going to be updated.\\n```\\nfunction getPurchasedAmount(address holder) public returns (uint amount) {\\n    // check if any delegation was ended\\n    for (uint i = 0; i < \\_endingDelegations[holder].length; ++i) {\\n        getState(\\_endingDelegations[holder][i]);\\n    }\\n    return \\_purchased[holder];\\n```\\n\\nBut `getPurchasedAmount` function is mostly used after iterating over all delegations of the holder.
Resolution\\nIssue is fixed as a part of the major code changes in skalenetwork/skale-manager#92\\nRemove `_endingDelegations` and switch to a mechanism that does not require looping through delegations list of potentially unlimited size.
```\\nfunction getPurchasedAmount(address holder) public returns (uint amount) {\\n    // check if any delegation was ended\\n    for (uint i = 0; i < \\_endingDelegations[holder].length; ++i) {\\n        getState(\\_endingDelegations[holder][i]);\\n    }\\n    return \\_purchased[holder];\\n```\\n