Open
Description
ethjs-util
Issue Type
- Bug (https://github.com/ethjs/ethjs-util/blob/master/.github/CONTRIBUTING.md#bug-reports)
- Feature (https://github.com/ethjs/ethjs-util/blob/master/.github/CONTRIBUTING.md#feature-requests)
Description
The intToBuffer() function is broken after this PR was merged: #7
It fails for numbers that don't produce an even length hex string. It's breaking the following modules:
- ethereumjs-util: An in-range update of ethjs-util is breaking the build 🚨 ethereumjs/ethereumjs-util#132
- ethereumjs-blockchain: An in-range update of tape is breaking the build 🚨 ethereumjs/ethereumjs-blockchain#56
Steps to reproduce
const util = require('ethjs-util')
const buf = util.intToBuffer(1);
console.log(buf) // output: "<Buffer >" (expected: "<Buffer 01>")
assert.equal(buf.toString('hex'), '01');
Versions
- Node/NPM: 9.8.0
- Browser: N/A
Metadata
Metadata
Assignees
Labels
No labels