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

Missing error message details on non-mandatory-script-verify-flag #94

Open
timmclean opened this issue Apr 18, 2019 · 1 comment
Open

Comments

@timmclean
Copy link

When sendrawtransaction is used with a transaction signature not in canonical form, the following error is returned:

16: ConnectInputs failed: non-mandatory-script-verify-flag (No error)

(No error) should be the actual error message, but it looks like error message is being taken from the wrong CScriptCheck instance:

multichain/src/core/main.cpp

Lines 2147 to 2150 in 4ddb443

CScriptCheck check(*coins, tx, i,
flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore);
if (check())
return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError())));

check is the instance that succeeded, so it is always "No error". The error message from the check that failed should be used instead.

@gidgreen
Copy link
Contributor

Thanks, we'll take a look.

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

No branches or pull requests

2 participants