Closed code423n4 closed 2 years ago
This seems totally not worth it, since this function is to be used in very rare cases, i.e. changing the contract, and only by admin, who would not do it if he is not sure there are funds worth withdrawing from the contract. That said, adding a check would only cause more gas consumed.
Adding to warden's main Gas Optimization #156
An if could be added before transferring the totalBalance with if(totalBalance!= 0).