mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
All fields of BlockInfo now private.
This commit is contained in:
parent
3f003c2344
commit
20be64f599
@ -151,12 +151,12 @@ void ImportTest::importEnv(json_spirit::mObject& _o)
|
||||
assert(_o.count("currentCoinbase") > 0);
|
||||
assert(_o.count("currentNumber") > 0);
|
||||
|
||||
m_environment.currentBlock.parentHash = h256(_o["previousHash"].get_str());
|
||||
m_environment.currentBlock.parentHash() = h256(_o["previousHash"].get_str());
|
||||
m_environment.currentBlock.number = toInt(_o["currentNumber"]);
|
||||
m_environment.currentBlock.gasLimit = toInt(_o["currentGasLimit"]);
|
||||
m_environment.currentBlock.difficulty = toInt(_o["currentDifficulty"]);
|
||||
m_environment.currentBlock.timestamp = toInt(_o["currentTimestamp"]);
|
||||
m_environment.currentBlock.coinbaseAddress = Address(_o["currentCoinbase"].get_str());
|
||||
m_environment.currentBlock.timestamp() = toInt(_o["currentTimestamp"]);
|
||||
m_environment.currentBlock.coinbaseAddress() = Address(_o["currentCoinbase"].get_str());
|
||||
|
||||
m_statePre.m_previousBlock = m_environment.previousBlock;
|
||||
m_statePre.m_currentBlock = m_environment.currentBlock;
|
||||
|
@ -1188,7 +1188,7 @@ BOOST_AUTO_TEST_CASE(now)
|
||||
{
|
||||
char const* sourceCode = "contract test {\n"
|
||||
" function someInfo() returns (bool success) {\n"
|
||||
" return block.timestamp == now && now > 0;\n"
|
||||
" return block.timestamp() == now && now > 0;\n"
|
||||
" }\n"
|
||||
"}\n";
|
||||
compileAndRun(sourceCode);
|
||||
|
Loading…
Reference in New Issue
Block a user