Changing to AddAsign

This commit is contained in:
Tomusdrw 2016-01-17 11:26:37 +01:00
parent 48040590f5
commit 57129f4fd3

View File

@ -280,7 +280,7 @@ impl evm::Evm for Interpreter {
let (gas_cost, mem_size) = try!(self.get_gas_cost_mem(ext, instruction, &mut mem, &stack));
try!(self.verify_gas(&current_gas, &gas_cost));
mem.expand(mem_size);
current_gas = current_gas - gas_cost;
current_gas -= gas_cost;
evm_debug!({
println!("[0x{:x}][{}(0x{:x}) Gas: {:x}\n Gas Before: {:x}",
@ -301,7 +301,7 @@ impl evm::Evm for Interpreter {
match result {
InstructionResult::Ok => {},
InstructionResult::UnusedGas(gas) => {
current_gas = current_gas + gas;
current_gas += gas;
},
InstructionResult::UseAllGas => {
current_gas = U256::zero();