Skip to content
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

test: importdescriptors is not available for non-descriptor wallets #31609

Conversation

brunoerg
Copy link
Contributor

@brunoerg brunoerg commented Jan 6, 2025

This PR adds test coverage for the error thrown when trying to import descriptors into a non-descriptor wallet.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 6, 2025

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/31609.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK danielabrozzoni

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

Copy link
Contributor

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

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

Nice!

ACK 6b6b559

@maflcko
Copy link
Member

maflcko commented Jan 7, 2025

No objection, but this will just create a conflict with the bdb removal, at which point the test will be deleted as well?

@brunoerg brunoerg force-pushed the 2025-01-test-wallet-legacy-importdescriptors branch from 6b6b559 to f9dc456 Compare January 7, 2025 16:36
@brunoerg
Copy link
Contributor Author

brunoerg commented Jan 7, 2025

No objection, but this will just create a conflict with the bdb removal, at which point the test will be deleted as well?

The check will still exist in importdescriptors. But you're right, the legacy wallet iteration in this functional test will be removed, so it's better to move this check to wallet_migration test.

Copy link
Contributor

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

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

My understanding of the legacy removal PRs is limited, but it appears that the importdescriptor function will still include the check for legacy wallets.

utACK f9dc456

@maflcko
Copy link
Member

maflcko commented Jan 10, 2025

Huh? Now you are adding a test for a previous release, which does not increase the test coverage, see also https://corecheck.dev/bitcoin/bitcoin/pulls/31609 .

If you want to test a previous release, it would be better to submit the test against the previous release branch. But I am not sure if this is worth it.

Also, I don't understand why the check should be kept after the bdb removal. Why would one want to guard against bdb at runtime when it is impossible to load bdb?

@brunoerg
Copy link
Contributor Author

Huh? Now you are adding a test for a previous release, which does not increase the test coverage, see also https://corecheck.dev/bitcoin/bitcoin/pulls/31609 .

Nevermind, my bad, I did it quickly and did not notice it. I'm gonna close it because I believe this check could be removed within bdb removal.

@brunoerg brunoerg closed this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants