Skip to content

Commit 2736637

Browse files
committed
Change exit codes for compute phase skip reason in bounce msg
1 parent 126ac76 commit 2736637

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

crypto/block/transaction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3288,8 +3288,8 @@ bool Transaction::prepare_bounce_phase(const ActionPhaseConfig& cfg) {
32883288
.store_long(in_msg_info.created_at, 32) // created_at:uint32
32893289
.finalize_novm()); // original_info:^NewBounceOriginalInfo
32903290
if (compute_phase->skip_reason != ComputePhase::sk_none) {
3291-
body.store_long(0, 8); // bounced_by_phase:uint8
3292-
body.store_long(compute_phase->skip_reason - 1, 32); // exit_code:int32
3291+
body.store_long(0, 8); // bounced_by_phase:uint8
3292+
body.store_long(-compute_phase->skip_reason, 32); // exit_code:int32
32933293
} else if (!compute_phase->success) {
32943294
body.store_long(1, 8); // bounced_by_phase:uint8
32953295
body.store_long(compute_phase->exit_code, 32); // exit_code:int32

doc/GlobalVersions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ new_bounce_body#fffffffe
253253
- `original_info` - value, lt and unixtime of the original message.
254254
- `bounced_by_phase`:
255255
- `0` - compute phase was skipped. `exit_code` denotes the skip reason:
256-
- `exit_code = 0` - no state (account is uninit or frozen, and no state init is present in the message).
257-
- `exit_code = 1` - bad state (account is uninit or frozen, and state init in the message has the wrong hash).
258-
- `exit_code = 2` - no gas.
259-
- `exit_code = 3` - account is suspended.
256+
- `exit_code = -1` - no state (account is uninit or frozen, and no state init is present in the message).
257+
- `exit_code = -2` - bad state (account is uninit or frozen, and state init in the message has the wrong hash).
258+
- `exit_code = -3` - no gas.
259+
- `exit_code = -4` - account is suspended.
260260
- `1` - compute phase failed. `exit_code` is the value from the compute phase.
261261
- `2` - action phase failed. `exit_code` is the value from the action phase.
262262
- `exit_code` - 32-bit exit code, see above.

0 commit comments

Comments
 (0)