-
Notifications
You must be signed in to change notification settings - Fork 37.5k
wallet, refactor: Remove Legacy wallet unused warnings and errors #32481
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, refactor: Remove Legacy wallet unused warnings and errors #32481
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32481. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
a483558
to
e66e9ee
Compare
1c0ab13
to
3909051
Compare
3909051
to
dbc8427
Compare
Addressed feedback removing unnecessary descriptor wallet checks. |
dbc8427
to
5466936
Compare
Updates:
|
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.
Looking good based on a cursory glance, will take a deeper look soon.
Maybe mention a note in the PR description about wallet migration and how removing these checks don't affect that flow?
5466936
to
c89e583
Compare
Remove dead code due to legacy wallet removal.
SetupGeneration was supposed to be the function that all SPKMs used to setup automatic generation, but it didn't work out that way and ended up being legacy only. It should be deleted at this point.
It is not possible to load a legacy/ non-descriptor wallet anymore so no need to check for WALLET_FLAG_DESCRIPTORS in RPC calls, even when passing -rpcwallet/ JSON `/wallet/<walletname>/` endpoint, that searches for the wallets loaded already in the context.
c89e583
to
ce90f0c
Compare
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.
utACK ce90f0c
Looks fine to me, I navigated through the codebase to verify the diff's correctness. Suggested one more dead code removal if makes sense.
ACK ce90f0c |
150b5c9 wallet: replace `reload_wallet` with inline functionality (rkrux) 0f86da3 wallet: remove dead code in legacy wallet migration (rkrux) Pull request description: A discussion on a previous [PR 32481](#32481 (comment)) related to legacy wallet dead code removal made me realize that checking if the legacy wallet was loaded prior to the start of the migration is not required ever since legacy wallets can't be loaded in the first place. I also verified that the `load_on_start` persistent setting can also not cause the legacy wallets to be loaded, which further makes the case for removal of the above mentioned checks during migration. The current test coverage also shows these lines uncovered. ACKs for top commit: achow101: ACK 150b5c9 furszy: ACK 150b5c9 Tree-SHA512: 9bc7043cac1f4051228557208895e43648de3c7ffae6860c0676d1aa2db3a8ed3a09d1f9defacd96ca50bbb9699ba86652ccb0c5e55cc88be248a1fe727c13d9
Remove dead code due to legacy wallet support removal.
These changes have no impact on functionality. They are transparent to the end user, as legacy wallets can't be created or loaded anymore, so these checks are no longer reached. The legacy-to-descriptor wallet migration flow is not affected either, as these removals are not part of its process.