aboutsummaryrefslogtreecommitdiffstats
path: root/test/contracts
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-16 22:25:22 +0800
committerGitHub <noreply@github.com>2018-07-16 22:25:22 +0800
commit29dae15c50277d52087f2eddea7d2033754e2c1f (patch)
tree321fa187d152510403c005b0c44738453f6c8539 /test/contracts
parentb38c26bb0cbbb7fe80c99fc757cb6150c61a56b4 (diff)
parentbdac82ecdbb6a4d27e9c5b11ce48d2d653a652e6 (diff)
downloaddexon-solidity-29dae15c50277d52087f2eddea7d2033754e2c1f.tar.gz
dexon-solidity-29dae15c50277d52087f2eddea7d2033754e2c1f.tar.zst
dexon-solidity-29dae15c50277d52087f2eddea7d2033754e2c1f.zip
Merge pull request #4481 from ethereum/disallow-throw
[BREAKING] Deprecate the throw statement
Diffstat (limited to 'test/contracts')
-rw-r--r--test/contracts/AuctionRegistrar.cpp10
-rw-r--r--test/contracts/FixedFeeRegistrar.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/test/contracts/AuctionRegistrar.cpp b/test/contracts/AuctionRegistrar.cpp
index 14c37105..4ff55b75 100644
--- a/test/contracts/AuctionRegistrar.cpp
+++ b/test/contracts/AuctionRegistrar.cpp
@@ -125,26 +125,26 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
emit Changed(_name);
if (previousOwner != 0x0000000000000000000000000000000000000000) {
if (!record.owner.send(auction.sumOfBids - auction.highestBid / 100))
- throw;
+ revert();
} else {
if (!auction.highestBidder.send(auction.highestBid - auction.secondHighestBid))
- throw;
+ revert();
}
}
function reserve(string _name) external payable {
if (bytes(_name).length == 0)
- throw;
+ revert();
bool needAuction = requiresAuction(_name);
if (needAuction)
{
if (now < m_toRecord[_name].renewalDate)
- throw;
+ revert();
bid(_name, msg.sender, msg.value);
} else {
Record storage record = m_toRecord[_name];
if (record.owner != 0x0000000000000000000000000000000000000000)
- throw;
+ revert();
m_toRecord[_name].owner = msg.sender;
emit Changed(_name);
}
diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp
index bc0c4118..78db4761 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -84,7 +84,7 @@ contract FixedFeeRegistrar is Registrar {
function disown(string memory _name, address _refund) onlyrecordowner(_name) public {
delete m_recordData[uint(keccak256(bytes(_name))) / 8];
if (!_refund.send(c_fee))
- throw;
+ revert();
emit Changed(_name);
}
function transfer(string memory _name, address _newOwner) onlyrecordowner(_name) public {