mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #236 from ethereum/hot_gav
Fix up for new API from EIP-1.1.
This commit is contained in:
@@ -59,12 +59,14 @@ public:
|
||||
|
||||
void testCreationTimeGas(string const& _sourceCode)
|
||||
{
|
||||
EVMSchedule schedule;// TODO: make relevant to supposed context.
|
||||
|
||||
compileAndRun(_sourceCode);
|
||||
auto state = make_shared<KnownState>();
|
||||
PathGasMeter meter(*m_compiler.assemblyItems());
|
||||
GasMeter::GasConsumption gas = meter.estimateMax(0, state);
|
||||
u256 bytecodeSize(m_compiler.runtimeObject().bytecode.size());
|
||||
gas += bytecodeSize * c_createDataGas;
|
||||
gas += bytecodeSize * schedule.createDataGas;
|
||||
BOOST_REQUIRE(!gas.isInfinite);
|
||||
BOOST_CHECK(gas.value == m_gasUsed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user