1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-14 20:22:19 +00:00

Don't delete accounts with extra currencies (temporary) (#659)

This commit is contained in:
SpyCheese 2023-03-30 07:02:15 +00:00 committed by GitHub
parent b76158a753
commit 9be3701bc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -704,7 +704,9 @@ bool Transaction::prepare_storage_phase(const StoragePhaseConfig& cfg, bool forc
switch (acc_status) {
case Account::acc_uninit:
case Account::acc_frozen:
if (total_due > cfg.delete_due_limit) {
if (total_due > cfg.delete_due_limit && balance.extra.is_null()) {
// Keeping accounts with non-null extras is a temporary measure before implementing proper collection of
// extracurrencies from deleted accounts
res->deleted = true;
acc_status = Account::acc_deleted;
if (balance.extra.not_null()) {