Skip to content

Commit ed2c2c5

Browse files
fix vm steps
1 parent 47ea0bb commit ed2c2c5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tvm_executor/src/transaction_executor.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ pub trait TransactionExecutor {
684684
} else if is_bounceable_internal && execution_timed_out {
685685
log::debug!(target: "executor", "Fix bounceable timed out");
686686
vm_phase.gas_used = (gas.get_gas_limit() as u64).try_into()?;
687-
vm_phase.vm_steps = 0;
688687
gas.get_gas_limit() as u128
689688
} else {
690689
gas_config.calc_gas_fee(used)
@@ -700,7 +699,11 @@ pub trait TransactionExecutor {
700699

701700
// set mode
702701
vm_phase.mode = 0;
703-
vm_phase.vm_steps = vm.steps();
702+
if !(is_bounceable_internal && execution_timed_out) {
703+
vm_phase.vm_steps = vm.steps();
704+
} else {
705+
vm_phase.vm_steps = 0;
706+
}
704707
// TODO: vm_final_state_hash
705708
log::debug!(target: "executor", "acc_balance: {}, gas fees: {}", acc_balance.grams, vm_phase.gas_fees);
706709
if !acc_balance.grams.sub(&vm_phase.gas_fees)? {

0 commit comments

Comments
 (0)