From aef0f63aeee1e3f5d2ef4e77b0aaa56d330c9f9b Mon Sep 17 00:00:00 2001 From: Jesse Busman Date: Sun, 3 Dec 2017 12:08:53 +0100 Subject: [PATCH] There's no need to throw when burning 0 tokens Throwing when trying to burn 0 tokens is an unnecessary special case. If another contract wants to burn() a variable amount, it should not be forced to deal with this special case of burning 0. --- contracts/token/BurnableToken.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/token/BurnableToken.sol b/contracts/token/BurnableToken.sol index 2ff3b1fab..5c3ffa76b 100644 --- a/contracts/token/BurnableToken.sol +++ b/contracts/token/BurnableToken.sol @@ -15,7 +15,6 @@ contract BurnableToken is StandardToken { * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { - require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure