mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
wallet: Remove unused db functions
SOme db functions were for BDB, these are no longer needed.
This commit is contained in:
@@ -1267,33 +1267,6 @@ bool RunWithinTxn(WalletDatabase& database, std::string_view process_desc, const
|
||||
return RunWithinTxn(batch, process_desc, func);
|
||||
}
|
||||
|
||||
void MaybeCompactWalletDB(WalletContext& context)
|
||||
{
|
||||
static std::atomic<bool> fOneThread(false);
|
||||
if (fOneThread.exchange(true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const std::shared_ptr<CWallet>& pwallet : GetWallets(context)) {
|
||||
WalletDatabase& dbh = pwallet->GetDatabase();
|
||||
|
||||
unsigned int nUpdateCounter = dbh.nUpdateCounter;
|
||||
|
||||
if (dbh.nLastSeen != nUpdateCounter) {
|
||||
dbh.nLastSeen = nUpdateCounter;
|
||||
dbh.nLastWalletUpdate = GetTime();
|
||||
}
|
||||
|
||||
if (dbh.nLastFlushed != nUpdateCounter && GetTime() - dbh.nLastWalletUpdate >= 2) {
|
||||
if (dbh.PeriodicFlush()) {
|
||||
dbh.nLastFlushed = nUpdateCounter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fOneThread = false;
|
||||
}
|
||||
|
||||
bool WalletBatch::WriteAddressPreviouslySpent(const CTxDestination& dest, bool previously_spent)
|
||||
{
|
||||
auto key{std::make_pair(DBKeys::DESTDATA, std::make_pair(EncodeDestination(dest), std::string("used")))};
|
||||
|
||||
Reference in New Issue
Block a user