diff --git a/src/bank.cpp b/src/bank.cpp index 0a788fe..ffea911 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -203,13 +203,20 @@ BankResponse Bank::PruneUsers(time_t threshold_time, uint32_t threshold_bal) noe size_t deleted_count = 0; for (const auto &u : users) { - users.erase_if(u.first, [threshold_time, threshold_bal, &deleted_count](User &u) -> bool { + users.erase_if(u.first, [this, threshold_time, threshold_bal, &deleted_count](User &u) -> bool { #if MAX_LOG_SIZE > 0 if (u.log.data.back().time < threshold_time && u.balance < threshold_bal) #else if (u.balance < threshold_bal) #endif { +#if CONSERVATIVE_DISK_SAVE +#if MULTI_THREADED + save_flag.SetChangesOn(); +#else + save_flag = true; +#endif +#endif return ++deleted_count; } else