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

Unclear type of v in signature #157

Open
TheReturnOfJan opened this issue Nov 8, 2019 · 0 comments
Open

Unclear type of v in signature #157

TheReturnOfJan opened this issue Nov 8, 2019 · 0 comments

Comments

@TheReturnOfJan
Copy link
Contributor

The v in signatures assigned to inputs has 2 conflicting types.

1.) 8-bit unsigned

assert(Util.isU8(v), 'v must be a uint8.');

2.) 8-bit signed

dataBuf.writeInt8(this.v, 97);

So the only possible values one can assign of v without throwing an exception are (0, 127), which is neither a byte (0, 255) or an unsigned byte (-128, 127).

But this is not critical at all since valid v's will always be in the range (0, 127) - read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants