Skip to content

Commit ca7a098

Browse files
committed
Fix setting transaction end_status
1 parent 99e88ed commit ca7a098

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

crypto/block/transaction.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3496,6 +3496,9 @@ bool Transaction::compute_state(const SerializeConfig& cfg) {
34963496
if (frozen_hash == account.addr_orig) {
34973497
// if frozen_hash equals account's "original" address (before rewriting), do not need storing hash
34983498
CHECK(cb.store_long_bool(0, 2)); // account_uninit$00 = AccountState
3499+
if (cfg.global_version >= 13) {
3500+
acc_status = Account::acc_uninit;
3501+
}
34993502
} else {
35003503
CHECK(cb.store_long_bool(1, 2) // account_frozen$01
35013504
&& cb.store_bits_bool(frozen_hash)); // state_hash:bits256
@@ -4238,6 +4241,7 @@ td::Status FetchConfigParams::fetch_config_params(
42384241
action_phase_cfg->global_version = config.get_global_version();
42394242
}
42404243
{
4244+
serialize_cfg->global_version = config.get_global_version();
42414245
serialize_cfg->extra_currency_v2 = config.get_global_version() >= 10;
42424246
serialize_cfg->disable_anycast = config.get_global_version() >= 10;
42434247
serialize_cfg->store_storage_dict_hash = config.get_global_version() >= 11;

crypto/block/transaction.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ struct ActionPhaseConfig {
186186
};
187187

188188
struct SerializeConfig {
189+
int global_version = 0;
189190
bool extra_currency_v2{false};
190191
bool disable_anycast{false};
191192
bool store_storage_dict_hash{false};

doc/GlobalVersions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,7 @@ The bounced message has the same 0th and 1st bits in `extra_flags` as the origin
290290
## Version 13
291291

292292
### TVM changes
293-
- Instructions `LSHIFT`, `RSHIFT`, `LSHIFTDIV`, `MULRSHIFT`, `AND`, `OR` now correctly return an error (or `NaN`, if quiet) when one of the arguments is `NaN` (or out of bounds for shifts).
293+
- Instructions `LSHIFT`, `RSHIFT`, `LSHIFTDIV`, `MULRSHIFT`, `AND`, `OR` now correctly return an error (or `NaN`, if quiet) when one of the arguments is `NaN` (or out of bounds for shifts).
294+
295+
### Transaction changes
296+
- `end_status` of a transaction is now correctly set to `uninit` when the account is frozen with `frozen_hash` equal to its address.

validator/impl/validate-query.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,7 @@ bool ValidateQuery::fetch_config_params() {
11861186
action_phase_cfg_.global_version = config_->get_global_version();
11871187
}
11881188
{
1189+
serialize_cfg_.global_version = config_->get_global_version();
11891190
serialize_cfg_.extra_currency_v2 = config_->get_global_version() >= 10;
11901191
serialize_cfg_.disable_anycast = config_->get_global_version() >= 10;
11911192
serialize_cfg_.store_storage_dict_hash = config_->get_global_version() >= 11;

0 commit comments

Comments
 (0)