Skip to content

Conversation

@pstratem
Copy link
Contributor

This removes the CWalletDB references in account_tests.cpp by adding passthrough functions in CWallet

@luke-jr
Copy link
Member

luke-jr commented Sep 10, 2016

ThreadFlushWalletDB is started from init still, no?

@pstratem
Copy link
Contributor Author

@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).

@maflcko
Copy link
Member

maflcko commented Sep 11, 2016

utACK 461a760

@jonasschnelli
Copy link
Contributor

utACK 461a7600664fe771964fc0bf153004c087bd8004

Copy link
Contributor

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.

Copy link
Contributor Author

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

@pstratem pstratem force-pushed the 2016-09-09-cwallet-listaccountcreditdebit branch from 461a760 to 56191f5 Compare September 15, 2016 13:50
@pstratem pstratem force-pushed the 2016-09-09-cwallet-listaccountcreditdebit branch from 56191f5 to bad0a6e Compare September 15, 2016 13:52
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);
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fair enough

@laanwj laanwj merged commit 2ca6b9d into bitcoin:master Sep 20, 2016
laanwj added a commit that referenced this pull request Sep 20, 2016
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)
@laanwj
Copy link
Member

laanwj commented Sep 20, 2016

utACK 2ca6b9d

codablock pushed a commit to codablock/dash that referenced this pull request Jan 11, 2018
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)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
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)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants