Fix test contracts.

This commit is contained in:
chriseth 2016-06-29 00:14:22 +02:00
parent 272a9d94d2
commit ccba763845
2 changed files with 12 additions and 5 deletions

View File

@ -124,13 +124,19 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
function onAuctionEnd(string _name) internal {
var auction = m_auctions[_name];
var record = m_toRecord[_name];
if (record.owner != 0)
record.owner.send(auction.sumOfBids - auction.highestBid / 100);
else
auction.highestBidder.send(auction.highestBid - auction.secondHighestBid);
var previousOwner = record.owner;
record.renewalDate = now + c_renewalInterval;
record.owner = auction.highestBidder;
Changed(_name);
if (previousOwner != 0) {
if (!record.owner.send(auction.sumOfBids - auction.highestBid / 100))
throw;
}
else
{
if (!auction.highestBidder.send(auction.highestBid - auction.secondHighestBid))
throw;
}
}
function reserve(string _name) external {

View File

@ -81,7 +81,8 @@ contract FixedFeeRegistrar is Registrar {
}
function disown(string _name, address _refund) onlyrecordowner(_name) {
delete m_recordData[uint(sha3(_name)) / 8];
_refund.send(c_fee);
if (!_refund.send(c_fee))
throw;
Changed(_name);
}
function transfer(string _name, address _newOwner) onlyrecordowner(_name) {