mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-18 17:12:14 +11:00
🔥⚡ removed move constructor variant & adjusted to new log structure
This commit is contained in:
parent
22d1e02460
commit
e5302af958
1 changed files with 4 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
* @param init_bal initial balance
|
* @param init_bal initial balance
|
||||||
* @param init_pass initial password
|
* @param init_pass initial password
|
||||||
*/
|
*/
|
||||||
User::User(uint32_t init_bal, std::string &&init_pass) noexcept : balance(init_bal), password(xxHashStringGen{}(init_pass)) {}
|
User::User(uint32_t init_bal, const std::string &init_pass) noexcept : balance(init_bal), password(xxHashStringGen{}(init_pass)) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief User Constructor for loading
|
* @brief User Constructor for loading
|
||||||
|
|
@ -25,16 +25,15 @@ User::User(uint32_t init_bal, XXH64_hash_t init_pass, const Json::Value &log_j)
|
||||||
#if MAX_LOG_SIZE == 1
|
#if MAX_LOG_SIZE == 1
|
||||||
log.data = (
|
log.data = (
|
||||||
#else
|
#else
|
||||||
log.data.push_back(
|
log.data.emplace_back(
|
||||||
#endif
|
#endif
|
||||||
Transaction(
|
|
||||||
log_j[i]["from"].asCString(),
|
log_j[i]["from"].asCString(),
|
||||||
log_j[i]["to"].asCString(),
|
log_j[i]["to"].asCString(),
|
||||||
log_j[i]["amount"].asUInt(),
|
log_j[i]["amount"].asUInt(),
|
||||||
#ifdef _USE_32BIT_TIME_T
|
#ifdef _USE_32BIT_TIME_T
|
||||||
log_j[i]["time"].asUInt()));
|
log_j[i]["time"].asUInt()))
|
||||||
#else
|
#else
|
||||||
log_j[i]["time"].asUInt64()));
|
log_j[i]["time"].asUInt64());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue