descriptor: add unit tests, rejecting multiple pubkeys - #10947
Merged
Merged
Conversation
The wpkh() branch reported "pkh descriptor" when rejecting a second
pubkey; it now names wpkh. The bare multisig branch built its
"Cannot have {} pubkeys" message without formatting in the count, so
the placeholder was emitted verbatim; it now substitutes the number of
pubkeys.
Member
|
Looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two error messages in
electrum/descriptor.pyare wrong:wpkhbranch raises"More than one pubkey in pkh descriptor", namingpkhinstead ofwpkh;"Cannot have {} pubkeys in bare multisig: only at most 3 pubkeys"is never formatted, so it prints the literal{}rather than the key count.Both are corrected, and a regression test covers each.
These mirror the same fix in Bitcoin Core's HWI, which shares this descriptor code: bitcoin-core/HWI#857.