Skip to content

[Foundations > Actions > Reserve] Incorrect reserve action failure description #2002

@Trinketer22

Description

@Trinketer22

Reserve algorithm description issue

Documentation claims that on failure, reserve action will be skipped.

The algorithm is as follows:
1. Check that `mode` has flag `ReserveBounceIfActionFail`:
- if so, then in case of any failure the action phase will be interrupted and the bounce phase will be initiated;
- if not, then in case of any failure the reservation action will be skipped.

However, this is not true, and reserve action fails just like any other.
It returns error code like any other action:https://github.com/ton-blockchain/ton/blob/a31025f39ed0dae5f6799280133624dc3a23cefb/crypto/block/transaction.cpp#L3105-L3114

And the error code handler is common for all the action types too.

In fact, there is no direct way to "skip" the failed reserve action like it is possible in message action.
Closest to skipping would be using RESERVE_AT_MOST flag, but in this case reserve action just can't fail, but not skipped.

Metadata

Metadata

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions