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
fanquake added the label
Wallet
on May 28, 2020
DrahtBot
commented at 6:43 am on May 29, 2020:
member
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
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 :)
achow101 force-pushed
on Jun 1, 2020
achow101 force-pushed
on Jun 2, 2020
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.
achow101 force-pushed
on Jun 9, 2020
achow101 force-pushed
on Jun 16, 2020
DrahtBot added the label
Needs rebase
on Jun 18, 2020
achow101 force-pushed
on Jun 18, 2020
DrahtBot removed the label
Needs rebase
on Jun 18, 2020
achow101 force-pushed
on Jun 18, 2020
achow101 force-pushed
on Jun 19, 2020
meshcollider added this to the "PRs" column in a project
achow101 force-pushed
on Jun 20, 2020
achow101 force-pushed
on Jun 22, 2020
ryanofsky approved
ryanofsky
commented at 1:18 pm on June 23, 2020:
member
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:
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
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
DrahtBot added the label
Needs rebase
on Jul 8, 2020
achow101 force-pushed
on Jul 9, 2020
DrahtBot removed the label
Needs rebase
on Jul 9, 2020
achow101 force-pushed
on Jul 14, 2020
ryanofsky approved
ryanofsky
commented at 8:35 pm on July 21, 2020:
member
Code review ACK1937a88a76548979da8559fd3e959fda7a569901 last 3 commits. Easy review and nice cleanup
23f633c19c65957f0233ec2b2c1a5555006abe37 Introduce DummyDatabase and use it in the tests (5/7)
1937a88a76548979da8559fd3e959fda7a569901 walletdb: Ensure that having no database handle is a failure (7/7)
achow101 force-pushed
on Jul 23, 2020
ryanofsky approved
ryanofsky
commented at 7:32 pm on July 24, 2020:
member
Code review ACKd93adba3f9d3fde4c0a79a62b13e7759fb892466. No changes since last review other than rebase.
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: 2024-11-17 06:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me