-
Notifications
You must be signed in to change notification settings - Fork 388
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
Bad enumeration of script errors #1285
Comments
The error exists on master: https://github.com/ElementsProject/elements/blob/master/src/script/script_error.h#L85 |
This fuzz test is the only place where I think it is safest to keep both errors in case Bitcoin Core starts using either in the future. |
uncomputable
added a commit
to uncomputable/elements
that referenced
this issue
Nov 10, 2023
SCRIPT_ERR_COUNT is a pseudo error that returns the number of errors. It must always be last in the enum: ElementsProject#1285
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
elements/src/script/script_error.h
Line 87 in 20c5630
has incorrectly inserted new Elements errors into this enumeration. All the new elements errors need to go before
SCRIPT_ERR_ERROR_COUNT
, which isn't actually a real error. ThenSCRIPT_ERR_LAST
needs to be reset toSCRIPT_ERR_ERROR_COUNT
, as it originally was.AFAICT the only consequences of this error are for the fuzzer.
I'm not sure that having both
SCRIPT_ERR_LAST
andSCRIPT_ERR_ERROR_COUNT
makes sense, but that is how it is in Bitcoin at the moment.cc @uncomputable
The text was updated successfully, but these errors were encountered: