mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 12:37:08 +11:00
🐛 fixed state bug
This commit is contained in:
parent
491f5f9adf
commit
588c56a6cc
1 changed files with 3 additions and 2 deletions
|
|
@ -80,9 +80,9 @@ public:
|
|||
}
|
||||
|
||||
//if A exists, A can afford it, and A's password matches
|
||||
bool state = false;
|
||||
{
|
||||
std::shared_lock<std::shared_mutex> lock{send_funds_l}; //because SendFunds requires 3 locking operations
|
||||
bool state = false;
|
||||
users.modify_if(a_name, [&state, amount, &attempt](User &a) {
|
||||
if (state = (a.balance >= amount) && (a.password == XXH3_64bits(attempt.data(), attempt.size())))
|
||||
{
|
||||
|
|
@ -192,9 +192,10 @@ public:
|
|||
res[99 - i]["recieving"] = l.data[i].recieving;
|
||||
}
|
||||
});
|
||||
}
|
||||
return res;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Save()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue