diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index dd38ef973..6d82e94b3 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -276,8 +276,10 @@ void CompilerUtils::memoryCopy() m_context << u256(0) << u256(identityContractAddress); // compute gas costs m_context << u256(32) << eth::Instruction::DUP5 << u256(31) << eth::Instruction::ADD; - m_context << eth::Instruction::DIV << u256(eth::c_identityWordGas) << eth::Instruction::MUL; - m_context << u256(eth::c_identityGas) << eth::Instruction::ADD; + static unsigned c_identityGas = 3; + static unsigned c_identityWordGas = 15; + m_context << eth::Instruction::DIV << u256(c_identityWordGas) << eth::Instruction::MUL; + m_context << u256(c_identityGas) << eth::Instruction::ADD; m_context << eth::Instruction::CALL; m_context << eth::Instruction::POP; // ignore return value } diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 81543356a..f2aa2e8e3 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -1151,7 +1151,7 @@ BOOST_AUTO_TEST_CASE(blockchain) " blockNumber = block.number;\n" " }\n" "}\n"; - m_envInfo.setBeneficiary(Address(0x123)); + m_envInfo.setAuthor(Address(0x123)); m_envInfo.setNumber(7); compileAndRun(sourceCode, 27); BOOST_CHECK(callContractFunctionWithValue("someInfo()", 28) == encodeArgs(28, 0x123, 7)); diff --git a/test/libsolidity/solidityExecutionFramework.h b/test/libsolidity/solidityExecutionFramework.h index 4da02eb2d..64faf7b6c 100644 --- a/test/libsolidity/solidityExecutionFramework.h +++ b/test/libsolidity/solidityExecutionFramework.h @@ -42,7 +42,8 @@ namespace test class ExecutionFramework { public: - ExecutionFramework() + ExecutionFramework(): + m_state(0) { if (g_logVerbosity != -1) g_logVerbosity = 0;