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

feature request: validation error message handling #13

Open
Alrighttt opened this issue Aug 6, 2020 · 0 comments
Open

feature request: validation error message handling #13

Alrighttt opened this issue Aug 6, 2020 · 0 comments

Comments

@Alrighttt
Copy link
Member

When broadcasting a pyCC transaction via komodod's sendrawtransaction command, if the validation fails. We receive this error message:

error code: -26
error message:
16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element)

https://github.com/KomodoPlatform/pycc/blob/master/pycc/lib.py#L346
An assertion such at this one will be displayed in stderr, but the user(or wallet or dapp) will have no indication as to why it failed without having access to stdout of komodod.

It would be useful if we were able to relay the exception back to the user by changing this error message.

This function here https://github.com/ssadler/komodo/blob/b926989fa0602093a694b001ad86192fd26a42d0/src/cc/pycc.cpp#L146 is able to print the exception(along with the assert message), so it is likely a good place to start.
ex:AssertionError: TODO: nice error message

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

1 participant