mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace throw with revert() in compilation tests
This commit is contained in:
committed by
chriseth
parent
aa08460d94
commit
bdac82ecdb
@@ -27,7 +27,7 @@ contract TestToken {
|
||||
returns (bool success)
|
||||
{
|
||||
if (balances[msg.sender] < _value) {
|
||||
throw;
|
||||
revert();
|
||||
}
|
||||
balances[msg.sender] -= _value;
|
||||
balances[_to] += _value;
|
||||
@@ -40,7 +40,7 @@ contract TestToken {
|
||||
returns (bool success)
|
||||
{
|
||||
if (balances[_from] < _value || allowed[_from][msg.sender] < _value) {
|
||||
throw;
|
||||
revert();
|
||||
}
|
||||
balances[_to] += _value;
|
||||
balances[_from] -= _value;
|
||||
|
||||
Reference in New Issue
Block a user