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

Segwitv0 compilation of x-only keys panics #761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shesek
Copy link
Contributor

@shesek shesek commented Oct 23, 2024

It should Err, but currently panics. The PR adds a test case demonstrating the issue (but not a fix):

test policy::compiler::tests::segwitv0_xonly_pk ... FAILED

---- policy::compiler::tests::segwitv0_xonly_pk stdout ----
thread 'policy::compiler::tests::segwitv0_xonly_pk' panicked at src/policy/compiler.rs:526:52:
Terminal creation must always succeed: ContextError(XOnlyKeysNotAllowed("08c0fcf8895f4361b4fc77afe2ad53b0bd27dcebfd863421b2b246dc283d4103", "Segwitv0"))

Parsing a wsh(pk(XONLY)) straight into a Descriptor does work as expected and raises an Err, as covered by this test case.

@apoelstra
Copy link
Member

Good find! I suspect I broke this in #732.

shesek added a commit to shesek/minsc that referenced this pull request Oct 25, 2024
shesek added a commit to shesek/minsc that referenced this pull request Oct 25, 2024
shesek added a commit to shesek/minsc that referenced this pull request Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants