-
Notifications
You must be signed in to change notification settings - Fork 30
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 for intToBuffer method #9
Conversation
Will review, thanks!
…Sent from my iPhone
On Jun 8, 2018, at 9:56 AM, Coveralls ***@***.***> wrote:
Coverage remained the same at 100.0% when pulling 951e383 on vpulim:fix-int-to-buffer into e1ea887 on ethjs:master.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Can you describe where and how you are using this module, it would be helpful.
…Sent from my iPhone
On Jun 8, 2018, at 9:56 AM, Coveralls ***@***.***> wrote:
Coverage remained the same at 100.0% when pulling 951e383 on vpulim:fix-int-to-buffer into e1ea887 on ethjs:master.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@SilentCicero This module is used in ethereumjs-util to convert integers to Buffers (https://github.com/ethereumjs/ethereumjs-util/blob/master/index.js#L170). Its also used in tests for ethereumjs-blockchain (https://github.com/ethereumjs/ethereumjs-blockchain/blob/master/test/index.js#L61). However, simply calling intToBuffer() on ethjs-util fails when you pass in an integer < 16 (it returns an empty Buffer) |
This was due to the previous PR, okay, lets patch it then, thanks!
…On Fri, Jun 8, 2018 at 10:59 AM, Vinay Pulim ***@***.***> wrote:
@SilentCicero <https://github.com/SilentCicero> This module is used in
ethereumjs-util to convert integers to Buffers (https://github.com/
ethereumjs/ethereumjs-util/blob/master/index.js#L170). Its also used in
tests for ethereumjs-blockchain (https://github.com/ethereumjs/ethereumjs-
blockchain/blob/master/test/index.js#L61).
However, simply calling intToBuffer() on ethjs-util fails when you pass in
an integer < 16.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJWhXhFLp3-QCQNcWzFRWg7x2XatLUZNks5t6pE4gaJpZM4UgQWi>
.
|
Great! Thanks |
@vpulim should be up in NPM [email protected] |
Fix for #8
In the intToBuffer() method, we now call padToEven() on the hex string generated by intToHex() to ensure the new Buffer object can parse the hex string correctly.
NOTE: This fix is compatible with PR #7 and still maintains the fix for issue #6