achow101
commented at 10:13 PM on May 28, 2020:
member
In the unit tests, we use a dummy WalletDatabase which does nothing and always returns true. This is currently implemented by creating a BerkeleyDatabase in dummy mode. This PR instead adds a DummyDatabase class which does nothing and never fails for use in the tests. CreateDummyWalletDatabase is changed to return this DummyDatabase and BerkeleyDatabase is cleaned up to remove all of the checks for IsDummy.
Based on WalletDatabase abstract class introduced in #19334
DrahtBot
commented at 6:43 AM on May 29, 2020:
contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
#19619 (Remove wallet.dat path handling from wallet.cpp, rpcwallet.cpp by ryanofsky)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
practicalswift
commented at 2:22 PM on May 30, 2020:
contributor
Concept ACK
Inspired by DummyDatabase I'll try to find time to do create a FuzzedDatabase implementing the WalletDatabase interface but with data feeded by FuzzedDataProvider :)
DrahtBot added the label Needs rebase on Jun 2, 2020
achow101 force-pushed on Jun 2, 2020
DrahtBot removed the label Needs rebase on Jun 2, 2020
laanwj
commented at 3:20 PM on June 4, 2020:
member
Concept ACK, IsDummy was always a bit of a hack and now that there is a proper wallet database interface, creating a dummy at that level makes sense.
luke-jr
commented at 4:35 PM on June 5, 2020:
member
Do we lose testing of bdb this way?
achow101
commented at 4:48 PM on June 5, 2020:
member
Do we lose testing of bdb this way?
No. IsDummy was only used right at the beginning of functions so caused them to do nothing anyways. In places that may have been called but didn't check IsDummy, they would have exited early anyways due to no m_db being set.
ryanofsky
commented at 1:18 PM on June 23, 2020:
contributor
Code review ACK2a03ed863b8202b57392babcf94969220d7168e6 (just last three commits). Nice cleanup. It would be good to mention in PR description this is based on #19334
ryanofsky
commented at 1:28 PM on June 23, 2020:
contributor
Could consider moving new classes to src/wallet/test/ since they are only used to speed up unit tests and it would be confusing if they were ever used in real code
achow101
commented at 4:30 PM on June 23, 2020:
member
Could consider moving new classes to src/wallet/test/ since they are only used to speed up unit tests and it would be confusing if they were ever used in real code
SalvageWallet uses DummyDatabase for a dummy wallet.
achow101 force-pushed on Jun 23, 2020
DrahtBot added the label Needs rebase on Jul 1, 2020
achow101 force-pushed on Jul 1, 2020
achow101 force-pushed on Jul 1, 2020
DrahtBot removed the label Needs rebase on Jul 1, 2020
DrahtBot added the label Needs rebase on Jul 5, 2020
achow101 force-pushed on Jul 6, 2020
DrahtBot removed the label Needs rebase on Jul 6, 2020
Introduce DummyDatabase and use it in the tests0103d6434e
Remove BDB dummy databasesda039d2a91
walletdb: Ensure that having no database handle is a failure
Previously having no database handle could still be considered a success
when BerkeleyDatabase and BerkeleyBatch were used for dummy database
things. With dedicated DummyDatabase and DummyBatch classes now, these
should fail.
0fcff547d5
achow101 force-pushed on Jul 29, 2020
instagibbs
commented at 2:32 PM on July 30, 2020:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-05-19 12:53 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me