diff --git a/include/user.h b/include/user.h index 4cea02c..7883f4b 100644 --- a/include/user.h +++ b/include/user.h @@ -13,9 +13,7 @@ struct User User(uint32_t init_bal, const std::string &init_pass) noexcept; User(uint32_t init_bal, XXH64_hash_t init_pass) noexcept; -#if MAX_LOG_SIZE > 0 - User(uint32_t init_bal, XXH64_hash_t init_pass, const Json::Value &log_j) noexcept; -#endif User(const bank_dom::User &u) noexcept; + bank_dom::User Encode() const noexcept; }; diff --git a/src/bank.cpp b/src/bank.cpp index 0469ece..0a788fe 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -205,7 +205,7 @@ BankResponse Bank::PruneUsers(time_t threshold_time, uint32_t threshold_bal) noe { users.erase_if(u.first, [threshold_time, threshold_bal, &deleted_count](User &u) -> bool { #if MAX_LOG_SIZE > 0 - if (u.data.back().time < threshold_time && u.balance < threshold_bal) + if (u.log.data.back().time < threshold_time && u.balance < threshold_bal) #else if (u.balance < threshold_bal) #endif