From 3e7c89196ceb2742b62cd183d6fab74edc40647a Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 19 Oct 2015 09:19:38 +0000 Subject: Optimisation: Store transaction list order in memory rather than compute it every need Huge performance improvement (450%) for zapwallettxes --- src/wallet/walletdb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wallet/walletdb.h') diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 270f826aed..3ebc05afd1 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -110,6 +110,9 @@ public: bool WriteMinVersion(int nVersion); + /// This writes directly to the database, and will not update the CWallet's cached accounting entries! + /// Use wallet.AddAccountingEntry instead, to write *and* update its caches. + bool WriteAccountingEntry_Backend(const CAccountingEntry& acentry); bool ReadAccount(const std::string& strAccount, CAccount& account); bool WriteAccount(const std::string& strAccount, const CAccount& account); @@ -118,7 +121,6 @@ public: /// Erase destination data tuple from wallet database bool EraseDestData(const std::string &address, const std::string &key); - bool WriteAccountingEntry(const CAccountingEntry& acentry); CAmount GetAccountCreditDebit(const std::string& strAccount); void ListAccountCreditDebit(const std::string& strAccount, std::list& acentries); -- cgit v1.2.3