-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: getNumber varint decode bug #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, fixing this very long lasting bug. Please see my comment for even less code.
Should all be resolved. |
Hey @JonasKruckenberg! It LGTM. Could you just fix the linting issues as well as squashing the commits into one using the conventional message format so we can have CI running? |
You can run linting locally via |
Alright, I had to do more rebase magic that I expected, but now things should be nice and tidy. The failing coverage test is nothing I can fix right? Because it seems like it's complaining just because I removed code. |
@JonasKruckenberg Thanks a lot of the hard work and reworking everything so that it conforms to our CI stuff (yes you can ignore that codecov error). In case you still feel like polishing, your commit message has typo: "deocde" -> "decode". |
This fixes #50 by removing the varintUint8ArrayDecode function and using varint.decode directly instead.
Thanks hahaha, I didn't notice that, I also spelled it wrong twice in the same commit. |
This hopefully fixes #50 by removing the call to numberToUint8Array() in varintUint8ArrayDecode.
It returned a wrongly encoded Uint8Array that had 1 as it's first byte, so all codec above 256 could not be resolved.