mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Changed way for saving of monero wallet.
This commit is contained in:
parent
c256d05029
commit
ad95ae3232
3 changed files with 26 additions and 75 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <mutex>
|
||||
#include "thread"
|
||||
#include "CwWalletListener.h"
|
||||
#if __APPLE__
|
||||
|
@ -182,6 +183,8 @@ extern "C"
|
|||
Monero::SubaddressAccount *m_account;
|
||||
uint64_t m_last_known_wallet_height;
|
||||
uint64_t m_cached_syncing_blockchain_height = 0;
|
||||
std::mutex store_lock;
|
||||
bool is_storing = false;
|
||||
|
||||
void change_current_wallet(Monero::Wallet *wallet)
|
||||
{
|
||||
|
@ -452,7 +455,15 @@ extern "C"
|
|||
|
||||
void store(char *path)
|
||||
{
|
||||
store_lock.lock();
|
||||
if (is_storing) {
|
||||
return;
|
||||
}
|
||||
|
||||
is_storing = true;
|
||||
get_current_wallet()->store(std::string(path));
|
||||
is_storing = false;
|
||||
store_lock.unlock();
|
||||
}
|
||||
|
||||
bool transaction_create(char *address, char *payment_id, char *amount,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue