diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2015-10-19 09:19:38 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2015-11-21 01:48:25 +0000 |
commit | 3e7c89196ceb2742b62cd183d6fab74edc40647a (patch) | |
tree | e1e14d18e88a0a88015e7c3c4642659b3b018487 /src/wallet/walletdb.h | |
parent | eac53ec992018a14db6f8a65a7ce333a4c8284cc (diff) |
Optimisation: Store transaction list order in memory rather than compute it every need
Huge performance improvement (450%) for zapwallettxes
Diffstat (limited to 'src/wallet/walletdb.h')
-rw-r--r-- | src/wallet/walletdb.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<CAccountingEntry>& acentries); |