refactor: bdb removals #32511
pull maflcko wants to merge 4 commits into bitcoin:master from maflcko:2505-del-get-dest-key changing 9 files +14 −91-
maflcko commented at 1:00 pm on May 15, 2025: memberremove dead code
-
remove unused Import* function signatures faecf158d9
-
remove unused AddrToPubKey fa91d57de3
-
remove unused GetAllDestinationsForKey fac72fef27
-
remove unused GetDestinationForKey
It is only used in test. There it is problematic, because it sometimes relies on m_default_address_type. If the default were changed to BECH32M, those tests would fail the assert(false). So just use PKHash{} in all tests and remove GetDestinationForKey.
-
DrahtBot commented at 1:00 pm on May 15, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32511.
Reviews
See the guideline for information on the review process.
Type Reviewers ACK davidgumberg, rkrux, achow101 If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #bitcoin-core/gui/872 (gui: Menu action to export a watchonly wallet by achow101)
- #32489 (wallet: Add
exportwatchonlywallet
RPC to export a watchonly version of a wallet by achow101) - #32475 (wallet: Use
util::Error
throughoutAddWalletDescriptor
instead of returningnullptr
for some errors by achow101) - #32432 (wallet, rpc: Change
OutputType
items fromstring
into compile-time constantsstring_view
by w0xlt)
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.
-
DrahtBot added the label Refactoring on May 15, 2025
-
fanquake requested review from rkrux on May 15, 2025
-
fanquake removed review request from rkrux on May 15, 2025
-
fanquake requested review from Sjors on May 15, 2025
-
fanquake requested review from rkrux on May 15, 2025
-
davidgumberg commented at 6:39 am on May 16, 2025: contributor
-
rkrux commented at 8:54 am on May 16, 2025: contributor
crACK fafee85358397289aa4c6b799d2603a5d89e83a2
The functions in the last 3 commits do look like good helper functions but I don’t mind their removal as they are not used besides tests, making it easier to navigate the codebase that I prefer. An alternative could be to move some of them under tests directory. But fine with current state of the PR too.
-
maflcko commented at 9:03 am on May 16, 2025: member
The functions in the last 3 commits do look like good helper functions but I don’t mind their removal as they are not used besides tests, making it easier to navigate the codebase that I prefer. An alternative could be to move some of them under tests directory. But fine with current state of the PR too.
It is hard for me to see a use case for the functions, even in tests. The tests only used them to generate dummy values, but those are trivially created inline. Generally, when it comes to providing helper functions for tests, my preference would be to focus on porting the real and user-exposed (wallet) RPCs to similarly-named or similarly-featured helper functions to be used in tests.
-
rkrux commented at 10:48 am on May 16, 2025: contributor
Generally, when it comes to providing helper functions for tests, my preference would be to focus on porting the real and user-exposed (wallet) RPCs to similarly-named or similarly-featured helper functions to be used in tests.
Interesting, something like this is done in this PR #32452 for
importprivkey
. -
maflcko commented at 11:33 am on May 16, 2025: memberThe pull here only touches C++ code, so I meant to have such helpers in C++ code. The python side can just use the RPCs directly (or use one of the pre-existing helpers)
-
rkrux commented at 1:47 pm on May 16, 2025: contributorOh yeah, for a second there, I got engrossed in that wrapper/helper function over there and forgot it’s in the functional test framework.
-
achow101 commented at 8:17 pm on May 16, 2025: memberACK fafee85358397289aa4c6b799d2603a5d89e83a2
-
achow101 merged this on May 16, 2025
-
achow101 closed this on May 16, 2025
-
maflcko deleted the branch on May 17, 2025
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: 2025-05-25 18:12 UTC
More mirrored repositories can be found on mirror.b10c.me