mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9805 from ethereum/develop
Merge develop into breaking.
This commit is contained in:
@@ -417,7 +417,7 @@ BOOST_AUTO_TEST_CASE(auction_simple)
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), 0);
|
||||
// "wait" until auction end
|
||||
|
||||
m_evmHost->tx_context.block_timestamp += m_biddingTime + 10;
|
||||
m_evmcHost->tx_context.block_timestamp += m_biddingTime + 10;
|
||||
// trigger auction again
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), m_sender);
|
||||
@@ -429,7 +429,7 @@ BOOST_AUTO_TEST_CASE(auction_bidding)
|
||||
string name = "x";
|
||||
|
||||
unsigned startTime = 0x776347e2;
|
||||
m_evmHost->tx_context.block_timestamp = startTime;
|
||||
m_evmcHost->tx_context.block_timestamp = startTime;
|
||||
|
||||
RegistrarInterface registrar(*this);
|
||||
// initiate auction
|
||||
@@ -437,19 +437,19 @@ BOOST_AUTO_TEST_CASE(auction_bidding)
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), 0);
|
||||
// overbid self
|
||||
m_evmHost->tx_context.block_timestamp = startTime + m_biddingTime - 10;
|
||||
m_evmcHost->tx_context.block_timestamp = startTime + m_biddingTime - 10;
|
||||
registrar.setNextValue(12);
|
||||
registrar.reserve(name);
|
||||
// another bid by someone else
|
||||
sendEther(account(1), 10 * ether);
|
||||
m_sender = account(1);
|
||||
m_evmHost->tx_context.block_timestamp = startTime + 2 * m_biddingTime - 50;
|
||||
m_evmcHost->tx_context.block_timestamp = startTime + 2 * m_biddingTime - 50;
|
||||
registrar.setNextValue(13);
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), 0);
|
||||
// end auction by first bidder (which is not highest) trying to overbid again (too late)
|
||||
m_sender = account(0);
|
||||
m_evmHost->tx_context.block_timestamp = startTime + 4 * m_biddingTime;
|
||||
m_evmcHost->tx_context.block_timestamp = startTime + 4 * m_biddingTime;
|
||||
registrar.setNextValue(20);
|
||||
registrar.reserve(name);
|
||||
BOOST_CHECK_EQUAL(registrar.owner(name), account(1));
|
||||
|
||||
Reference in New Issue
Block a user