Skip to content

Do not set secp256k1 error callback #41

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

Merged
merged 1 commit into from
Aug 30, 2020
Merged

Conversation

dgpv
Copy link

@dgpv dgpv commented Aug 28, 2020

Error callback in secp256k1 should not ever return.
The default one prints a message to stderr and does abort()
This is a really exceptional situation with no safe recovery, so
there's no sense in handling it in python. Better just use the default
handler.

Error callback in secp256k1 should not ever return.
The default one prints a message to stderr and does abort()
This is a really exceptional situation with no safe recovery, so
there's no sense in handling it in python. Better just use the default
handler.
@dgpv
Copy link
Author

dgpv commented Aug 28, 2020

As per rust-bitcoin/rust-secp256k1#228, the error callback should never return.

It seems that illegal callback returning could be OK, and it may be better for debugging incorrect function usage, rather than having an abort.

@dgpv dgpv merged commit 426cf48 into master Aug 30, 2020
@dgpv dgpv deleted the remove-secp245k1-error-handler branch August 30, 2020 10:33
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.

1 participant