mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix test contracts.
This commit is contained in:
parent
272a9d94d2
commit
ccba763845
@ -124,13 +124,19 @@ contract GlobalRegistrar is Registrar, AuctionSystem {
|
|||||||
function onAuctionEnd(string _name) internal {
|
function onAuctionEnd(string _name) internal {
|
||||||
var auction = m_auctions[_name];
|
var auction = m_auctions[_name];
|
||||||
var record = m_toRecord[_name];
|
var record = m_toRecord[_name];
|
||||||
if (record.owner != 0)
|
var previousOwner = record.owner;
|
||||||
record.owner.send(auction.sumOfBids - auction.highestBid / 100);
|
|
||||||
else
|
|
||||||
auction.highestBidder.send(auction.highestBid - auction.secondHighestBid);
|
|
||||||
record.renewalDate = now + c_renewalInterval;
|
record.renewalDate = now + c_renewalInterval;
|
||||||
record.owner = auction.highestBidder;
|
record.owner = auction.highestBidder;
|
||||||
Changed(_name);
|
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 {
|
function reserve(string _name) external {
|
||||||
|
@ -81,7 +81,8 @@ contract FixedFeeRegistrar is Registrar {
|
|||||||
}
|
}
|
||||||
function disown(string _name, address _refund) onlyrecordowner(_name) {
|
function disown(string _name, address _refund) onlyrecordowner(_name) {
|
||||||
delete m_recordData[uint(sha3(_name)) / 8];
|
delete m_recordData[uint(sha3(_name)) / 8];
|
||||||
_refund.send(c_fee);
|
if (!_refund.send(c_fee))
|
||||||
|
throw;
|
||||||
Changed(_name);
|
Changed(_name);
|
||||||
}
|
}
|
||||||
function transfer(string _name, address _newOwner) onlyrecordowner(_name) {
|
function transfer(string _name, address _newOwner) onlyrecordowner(_name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user