diff --git a/libevmjit/GasMeter.cpp b/libevmjit/GasMeter.cpp index 9c83ba8db..13c27118f 100644 --- a/libevmjit/GasMeter.cpp +++ b/libevmjit/GasMeter.cpp @@ -30,26 +30,26 @@ uint64_t getStepCost(Instruction inst) // TODO: Add this function to FeeSructure return 0; case Instruction::SSTORE: - return static_cast(c_sstoreGas); + return static_cast(FeeStructure::c_sstoreGas); case Instruction::SLOAD: - return static_cast(c_sloadGas); + return static_cast(FeeStructure::c_sloadGas); case Instruction::SHA3: - return static_cast(c_sha3Gas); + return static_cast(FeeStructure::c_sha3Gas); case Instruction::BALANCE: - return static_cast(c_sha3Gas); + return static_cast(FeeStructure::c_sha3Gas); case Instruction::CALL: case Instruction::CALLCODE: - return static_cast(c_callGas); + return static_cast(FeeStructure::c_callGas); case Instruction::CREATE: - return static_cast(c_createGas); + return static_cast(FeeStructure::c_createGas); default: // Assumes instruction code is valid - return static_cast(c_stepGas); + return static_cast(FeeStructure::c_stepGas); } } @@ -134,7 +134,7 @@ void GasMeter::countSStore(Ext& _ext, llvm::Value* _index, llvm::Value* _newValu { assert(!m_checkCall); // Everything should've been commited before - static const auto sstoreCost = static_cast(c_sstoreGas); + static const auto sstoreCost = static_cast(FeeStructure::c_sstoreGas); // [ADD] if oldValue == 0 and newValue != 0 => 2*cost // [DEL] if oldValue != 0 and newValue == 0 => 0 @@ -185,7 +185,7 @@ void GasMeter::commitCostBlock(llvm::Value* _additionalCost) void GasMeter::checkMemory(llvm::Value* _additionalMemoryInWords, llvm::IRBuilder<>& _builder) { // Memory uses other builder, but that can be changes later - auto cost = _builder.CreateMul(_additionalMemoryInWords, Constant::get(static_cast(c_memoryGas)), "memcost"); + auto cost = _builder.CreateMul(_additionalMemoryInWords, Constant::get(static_cast(FeeStructure::c_memoryGas)), "memcost"); _builder.CreateCall(m_gasCheckFunc, cost); }