Storage operations optimization
There are a lot of operations that write some value to the storage (uses `SSTORE` opcode) without actually changing it.\\nIn `getAndUpdateValue` function of `DelegationController` and TokenLaunchLocker:\\n```\\nfor (uint i = sequence.firstUnprocessedMonth; i <= month; ++i) {\\n    sequence.value = sequence.value.add(sequence.addDiff[i]).sub(sequence.subtractDiff[i]);\\n    delete sequence.addDiff[i];\\n    delete sequence.subtractDiff[i];\\n}\\n```\\n\\nIn `handleSlash` function of `Punisher` contract `amount` will be zero in most cases:\\n```\\nfunction handleSlash(address holder, uint amount) external allow("DelegationController") {\\n    \\_locked[holder] = \\_locked[holder].add(amount);\\n}\\n```\\n
Resolution\\nMitigated in skalenetwork/skale-manager#179\\nCheck if the value is the same and don't write it to the storage in that case.
```\\nfor (uint i = sequence.firstUnprocessedMonth; i <= month; ++i) {\\n    sequence.value = sequence.value.add(sequence.addDiff[i]).sub(sequence.subtractDiff[i]);\\n    delete sequence.addDiff[i];\\n    delete sequence.subtractDiff[i];\\n}\\n```\\n