-
Notifications
You must be signed in to change notification settings - Fork 37.7k
wallet: allow label for non-ranged external descriptor (if internal=false
) & disallow label for ranged descriptors
#31514
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
base: master
Are you sure you want to change the base?
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/31514. 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. ConflictsNo conflicts as of last run. |
after fix if you have label and ranged descriptor (even without providing
|
26b5394
to
3251036
Compare
Could you please add the motivation for the behavior change at the beginning of the PR description? For example, could describe how the process currently behaves, why you think that it is not adequate and what your change proposal does to improve the functionality. |
I thought it's clear - but added |
3251036
to
9131075
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.
@achow101 - looks like logic bugs to me
It would be nice to have a test that checks all 4 success/failure cases. |
9131075
to
dda90a9
Compare
added tests & rebased on master |
ACK dda90a9 Nice find!
Since we already have a test for this and this PR doesn't change it, could you clarify what you mean? |
…nged descriptors to have label * do not only check user provided range data to decide whether descriptor is ranged * properly handle std::optional<bool> when checking if descriptor is internal
dda90a9
to
664657e
Compare
the test in question:
passes as the bug does not manifest if "internal" is not provided by user |
re-based on current master |
ACK 664657e
I see. Can you mention that in the PR description?
There's no need to rebase if there are no conflicts. |
internal=false
) & disallow label for ranged descriptors
PR description (and title) updated |
Motivation:
internal=false
is provided via importdescriptor user data)Repro steps:
label=test
(not internal)response:
But in above, ONLY external has a label.
If you remove
label
from external descriptor import object - it will import no problem:Even tho it should NOT, as the descriptor is ranged. Current implementation relies on checking user provided data to decide whether desc is ranged.