Skip to content

Commit

Permalink
fix: emulator bounce conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
krigga committed Apr 26, 2024
1 parent 9a543c6 commit f65338e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emulator/transaction-emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ td::Result<std::unique_ptr<block::transaction::Transaction>> TransactionEmulator
return td::Status::Error(-669,"cannot create action phase of a new transaction for smart contract "s + acc->addr.to_hex());
}

if (trans->bounce_enabled && !trans->compute_phase->success && !trans->prepare_bounce_phase(*action_phase_cfg)) {
if (trans->bounce_enabled
&& (!trans->compute_phase->success || trans->action_phase->state_exceeds_limits || trans->action_phase->bounce)
&& !trans->prepare_bounce_phase(*action_phase_cfg)) {
return td::Status::Error(-669,"cannot create bounce phase of a new transaction for smart contract "s + acc->addr.to_hex());
}

Expand Down

0 comments on commit f65338e

Please sign in to comment.