-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[Wallet] Remove last external reference to CWalletDB #8696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wallet] Remove last external reference to CWalletDB #8696
Conversation
|
ThreadFlushWalletDB is started from init still, no? |
|
@luke-jr yes but that doesn't use CWalletDB and handles something having the database open already just fine. The goal here is to cache the CWalletDB across nested CWallet calls to avoid performance issues. (Similar to what the initial wallet encryption logic does). |
|
utACK 461a760 |
|
utACK 461a7600664fe771964fc0bf153004c087bd8004 |
src/wallet/wallet.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be kind of nice to not expose DBErrors further from wallet, though I would still call this a strict improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DBErrors is already exposed in CWallet::LoadWallet I'll probably change that later
461a760 to
56191f5
Compare
Simple pass through for CWalletDB::ListAccountCreditDebit
56191f5 to
bad0a6e
Compare
bad0a6e to
2ca6b9d
Compare
| bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb); | ||
| void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries); | ||
| bool AddAccountingEntry(const CAccountingEntry&); | ||
| bool AddAccountingEntry(const CAccountingEntry&, CWalletDB *pwalletdb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this one be private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, I'm going to go through all of the API calls and make things which can be private private as a sweep.
I'd rather fix this then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, fair enough
2ca6b9d Remove last reference to CWalletDB from accounting_tests.cpp (Patrick Strateman) 02e2a81 Remove pwalletdb parameter from CWallet::AddAccountingEntry (Patrick Strateman) d2e678d Add CWallet::ReorderTransactions and use in accounting_tests.cpp (Patrick Strateman) 59adc86 Add CWallet::ListAccountCreditDebit (Patrick Strateman)
|
utACK 2ca6b9d |
2ca6b9d Remove last reference to CWalletDB from accounting_tests.cpp (Patrick Strateman) 02e2a81 Remove pwalletdb parameter from CWallet::AddAccountingEntry (Patrick Strateman) d2e678d Add CWallet::ReorderTransactions and use in accounting_tests.cpp (Patrick Strateman) 59adc86 Add CWallet::ListAccountCreditDebit (Patrick Strateman)
2ca6b9d Remove last reference to CWalletDB from accounting_tests.cpp (Patrick Strateman) 02e2a81 Remove pwalletdb parameter from CWallet::AddAccountingEntry (Patrick Strateman) d2e678d Add CWallet::ReorderTransactions and use in accounting_tests.cpp (Patrick Strateman) 59adc86 Add CWallet::ListAccountCreditDebit (Patrick Strateman)
[Backport] bitcoin/bitcoin#13825 kill accounts This is a backport of the following commits: - from bitcoin/bitcoin#13825 - pick bitcoin/bitcoin@c9c32e6 - from bitcoin/bitcoin#14023 - pick bitcoin/bitcoin@f0dc850 - from bitcoin/bitcoin#13566 - pick bitcoin/bitcoin@702ae1e - pick bitcoin/bitcoin@cf15761 - pick bitcoin/bitcoin@0f3d6e9 - pick bitcoin/bitcoin@7110c83 - pick bitcoin/bitcoin@ef7bc88 - pick bitcoin/bitcoin@4279da4 - pick bitcoin/bitcoin@c410f41 - from bitcoin/bitcoin#9614 - pick bitcoin/bitcoin@02d9f50 - pick bitcoin/bitcoin@82b7dc3 - from bitcoin/bitcoin#8061 - pick bitcoin/bitcoin@ecb9741 - from bitcoin/bitcoin#6851 - pick bitcoin/bitcoin@3e7c89196c - from bitcoin/bitcoin#8828 - pick bitcoin/bitcoin@86029e7 - from bitcoin/bitcoin#8696 - just the first two commits, as AccountingEntry is going away - pick bitcoin/bitcoin@d2e678d - pick bitcoin/bitcoin@59adc86 - from bitcoin/bitcoin#8028 - pick bitcoin/bitcoin@0fd5997
This removes the CWalletDB references in account_tests.cpp by adding passthrough functions in CWallet