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

Add checks that the note field is properly formed #107

Merged
merged 2 commits into from
Jun 19, 2020

Conversation

fabrice102
Copy link
Contributor

Check that:

  • the note field is of type bytes.
  • the note field is at most 1024-byte long.
    Raises exception otherwise.

Without these checks, everything would appear to work but the transaction would be rejected by the node at the end (in the first case because the signature would be invalid).

Previously, if you created a transaction with a string note field,
no error would be raised but the generated signature would be
incorrect and the transaction would be rejected by the node.
@winder
Copy link
Contributor

winder commented Jun 19, 2020

@fabrice102 what types appear to work, but cause the transaction to be rejected? A string value also fails?

@fabrice102
Copy link
Contributor Author

@winder The issue is when you use string instead of bytes. Everything seems to work, but then when sending the transaction, it gets rejected because the signature is invalid.

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