status-network-token icon indicating copy to clipboard operation
status-network-token copied to clipboard

Low - 'if(!condition) throw;' should be avoided

Open k4ms opened this issue 8 years ago • 1 comments

This concerns many occurrences in source files MultiSigWallet.sol and MiniMeToken.sol.

There are several reason to use 'require(condition);' instead of 'if(!condition) throw;' :

  1. Faster execution, consumes less gas

  2. More clear : 'throw' naming is perturbing because it does not throw an exception that we can catch.

  3. Solidity will certainly deprecate throw (https://github.com/ethereum/solidity/issues/1793).

k4ms avatar Jun 18 '17 19:06 k4ms

MultiSigWallet.sol and MiniMeToken.sol are standard contrancts. We took the decission not to touch those contracts unless a critical issue it's found.

jbaylina avatar Jun 18 '17 23:06 jbaylina