Fix up for new API from EIP-1.1.

This commit is contained in:
Gav Wood
2015-11-21 14:34:21 +01:00
parent 9997aac163
commit bff172cf65
6 changed files with 18 additions and 15 deletions
+3 -1
View File
@@ -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);
}