The total community voting power is updated incorrectly when a user delegates.
When a user delegates their voting power from staked tokens, the total community voting power should be updated. But the update logic is not correct, the the total community voting power could be wrong values.\\n```\\n    tokenVotingPower[currentDelegate] -= amount;\\n    tokenVotingPower[_delegatee] += amount; \\n\\n    // If a user is delegating back to themselves, they regain their community voting power, so adjust totals up\\n    if (_delegator == _delegatee) {\\n      _updateTotalCommunityVotingPower(_delegator, true);\\n\\n    // If a user delegates away their votes, they forfeit their community voting power, so adjust totals down\\n    } else if (currentDelegate == _delegator) {\\n      _updateTotalCommunityVotingPower(_delegator, false);\\n    }\\n```\\n\\nWhen the total community voting power is increased in the first if statement, _delegator's token voting power might be positive already and community voting power might be added to total community voting power before.\\nAlso, currentDelegate's token voting power might be still positive after delegation so we shouldn't remove the communitiy voting power this time.
Add more conditions to check if the msg.sender delegated or not.\\n```\\n    if (_delegator == _delegatee) {\\n        if(tokenVotingPower[_delegatee] == amount) {\\n            _updateTotalCommunityVotingPower(_delegator, true);\\n        }\\n        if(tokenVotingPower[currentDelegate] == 0) {\\n            _updateTotalCommunityVotingPower(currentDelegate, false);      \\n        }\\n    } else if (currentDelegate == _delegator) {\\n        if(tokenVotingPower[_delegatee] == amount) {\\n            _updateTotalCommunityVotingPower(_delegatee, true);\\n        }\\n        if(tokenVotingPower[_delegator] == 0) {\\n            _updateTotalCommunityVotingPower(_delegator, false);      \\n        }\\n    }\\n```\\n
The total community voting power can be incorrect.
```\\n    tokenVotingPower[currentDelegate] -= amount;\\n    tokenVotingPower[_delegatee] += amount; \\n\\n    // If a user is delegating back to themselves, they regain their community voting power, so adjust totals up\\n    if (_delegator == _delegatee) {\\n      _updateTotalCommunityVotingPower(_delegator, true);\\n\\n    // If a user delegates away their votes, they forfeit their community voting power, so adjust totals down\\n    } else if (currentDelegate == _delegator) {\\n      _updateTotalCommunityVotingPower(_delegator, false);\\n    }\\n```\\n