Skip to content

Commit

Permalink
Fix and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixtysixter committed Sep 10, 2024
1 parent 3a01483 commit fab16dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion silkworm/rpc/core/evm_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void DebugTracer::on_instruction_start(uint32_t pc, const intx::uint256* stack_t

if (log.opcode == OP_RETURN || log.opcode == OP_STOP || log.opcode == OP_REVERT) {
log.gas_cost_check = 0;
} else if (log.depth == execution_state.msg->depth + 1) { // if (log.opcode != OP_CALL && log.opcode != OP_CALLCODE && log.opcode != OP_STATICCALL && log.opcode != OP_DELEGATECALL && log.opcode != OP_CREATE && log.opcode != OP_CREATE2) {
} else if (log.depth == execution_state.msg->depth + 1) {
log.gas_cost_check = execution_state.last_opcode_gas_cost;
}
}
Expand Down Expand Up @@ -262,6 +262,7 @@ void DebugTracer::on_execution_end(const evmc_result& result, const silkworm::In
case evmc_status_code::EVMC_STACK_OVERFLOW:
case evmc_status_code::EVMC_STACK_UNDERFLOW:
log.gas_cost = 0;
log.gas_cost_check = result.gas_cost;
break;

case evmc_status_code::EVMC_OUT_OF_GAS:
Expand Down

0 comments on commit fab16dc

Please sign in to comment.