remove auctionStart

This commit is contained in:
William Morriss 2017-10-08 13:24:27 -07:00
parent 6c09e32c3f
commit c3ec0beba5

View File

@ -221,7 +221,7 @@ activate themselves.
// absolute unix timestamps (seconds since 1970-01-01) // absolute unix timestamps (seconds since 1970-01-01)
// or time periods in seconds. // or time periods in seconds.
address public beneficiary; address public beneficiary;
uint public auctionStart; uint public auctionEnd;
uint public biddingTime; uint public biddingTime;
// Current state of the auction. // Current state of the auction.
@ -251,7 +251,7 @@ activate themselves.
address _beneficiary address _beneficiary
) { ) {
beneficiary = _beneficiary; beneficiary = _beneficiary;
auctionStart = now; auctionEnd = now + biddingTime;
biddingTime = _biddingTime; biddingTime = _biddingTime;
} }
@ -268,7 +268,7 @@ activate themselves.
// Revert the call if the bidding // Revert the call if the bidding
// period is over. // period is over.
require(now <= (auctionStart + biddingTime)); require(now <= auctionEnd);
// If the bid is not higher, send the // If the bid is not higher, send the
// money back. // money back.
@ -322,7 +322,7 @@ activate themselves.
// external contracts. // external contracts.
// 1. Conditions // 1. Conditions
require(now >= (auctionStart + biddingTime)); // auction did not yet end require(now >= auctionEnd); // auction did not yet end
require(!ended); // this function has already been called require(!ended); // this function has already been called
// 2. Effects // 2. Effects
@ -382,7 +382,6 @@ high or low invalid bids.
} }
address public beneficiary; address public beneficiary;
uint public auctionStart;
uint public biddingEnd; uint public biddingEnd;
uint public revealEnd; uint public revealEnd;
bool public ended; bool public ended;
@ -410,7 +409,6 @@ high or low invalid bids.
address _beneficiary address _beneficiary
) { ) {
beneficiary = _beneficiary; beneficiary = _beneficiary;
auctionStart = now;
biddingEnd = now + _biddingTime; biddingEnd = now + _biddingTime;
revealEnd = biddingEnd + _revealTime; revealEnd = biddingEnd + _revealTime;
} }