diff options
author | chriseth <c@ethdev.com> | 2015-09-30 00:45:55 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-09-30 00:45:55 +0800 |
commit | 3ff932c87255a50f600231223d1ee7444c756fb0 (patch) | |
tree | b36bf47a0c9380235d20cc2c2b1c309aab114fa5 | |
parent | 4457170ba637e0eb69a9ab65ef3c3505b38cb6bb (diff) | |
parent | 50827306a3f3d7084df7b1dce368fda66d0f3361 (diff) | |
download | dexon-solidity-3ff932c87255a50f600231223d1ee7444c756fb0.tar.gz dexon-solidity-3ff932c87255a50f600231223d1ee7444c756fb0.tar.zst dexon-solidity-3ff932c87255a50f600231223d1ee7444c756fb0.zip |
Merge pull request #100 from LianaHus/use_throw_in_action_registrar
used throw statement instead of __throw()
-rw-r--r-- | test/contracts/AuctionRegistrar.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp index a8b57f2f..e13a79e0 100644 --- a/test/contracts/AuctionRegistrar.cpp +++ b/test/contracts/AuctionRegistrar.cpp @@ -118,7 +118,7 @@ contract GlobalRegistrar is Registrar, AuctionSystem { function() { // prevent people from just sending funds to the registrar - __throw(); + throw; } function onAuctionEnd(string _name) internal { @@ -135,19 +135,19 @@ contract GlobalRegistrar is Registrar, AuctionSystem { function reserve(string _name) external { if (bytes(_name).length == 0) - __throw(); + throw; bool needAuction = requiresAuction(_name); if (needAuction) { if (now < m_toRecord[_name].renewalDate) - __throw(); + throw; bid(_name, msg.sender, msg.value); } else { Record record = m_toRecord[_name]; if (record.owner != 0) - __throw(); + throw; m_toRecord[_name].owner = msg.sender; Changed(_name); } @@ -210,11 +210,6 @@ contract GlobalRegistrar is Registrar, AuctionSystem { function content(string _name) constant returns (bytes32) { return m_toRecord[_name].content; } function name(address _addr) constant returns (string o_name) { return m_toName[_addr]; } - function __throw() internal { - // workaround until we have "throw" - uint[] x; x[1]; - } - mapping (address => string) m_toName; mapping (string => Record) m_toRecord; } |