Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 946 Lines • ▼ Show 20 Lines | for (const std::shared_ptr<CWallet> &pwallet : GetWallets()) { | ||||
if (dbh.nLastSeen != nUpdateCounter) { | if (dbh.nLastSeen != nUpdateCounter) { | ||||
dbh.nLastSeen = nUpdateCounter; | dbh.nLastSeen = nUpdateCounter; | ||||
dbh.nLastWalletUpdate = GetTime(); | dbh.nLastWalletUpdate = GetTime(); | ||||
} | } | ||||
if (dbh.nLastFlushed != nUpdateCounter && | if (dbh.nLastFlushed != nUpdateCounter && | ||||
GetTime() - dbh.nLastWalletUpdate >= 2) { | GetTime() - dbh.nLastWalletUpdate >= 2) { | ||||
if (BerkeleyBatch::PeriodicFlush(dbh)) { | if (dbh.PeriodicFlush()) { | ||||
dbh.nLastFlushed = nUpdateCounter; | dbh.nLastFlushed = nUpdateCounter; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
fOneThread = false; | fOneThread = false; | ||||
} | } | ||||
bool WalletBatch::VerifyEnvironment(const fs::path &wallet_path, | |||||
bilingual_str &errorStr) { | |||||
return BerkeleyBatch::VerifyEnvironment(wallet_path, errorStr); | |||||
} | |||||
bool WalletBatch::VerifyDatabaseFile(const fs::path &wallet_path, | |||||
bilingual_str &errorStr) { | |||||
return BerkeleyBatch::VerifyDatabaseFile(wallet_path, errorStr); | |||||
} | |||||
bool WalletBatch::WriteDestData(const CTxDestination &address, | bool WalletBatch::WriteDestData(const CTxDestination &address, | ||||
const std::string &key, | const std::string &key, | ||||
const std::string &value) { | const std::string &value) { | ||||
if (!IsValidDestination(address)) { | if (!IsValidDestination(address)) { | ||||
return false; | return false; | ||||
} | } | ||||
return WriteIC( | return WriteIC( | ||||
std::make_pair( | std::make_pair( | ||||
Show All 38 Lines |