From 9be3701bc0513a14d7805cc616c0f9d46530b436 Mon Sep 17 00:00:00 2001 From: SpyCheese Date: Thu, 30 Mar 2023 07:02:15 +0000 Subject: [PATCH] Don't delete accounts with extra currencies (temporary) (#659) --- crypto/block/transaction.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/block/transaction.cpp b/crypto/block/transaction.cpp index 47ea4e47..fcabf0c0 100644 --- a/crypto/block/transaction.cpp +++ b/crypto/block/transaction.cpp @@ -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()) {