Skip to content

Commit

Permalink
Merge pull request #241 from jchavarri/update-ethereumjs-util-v5
Browse files Browse the repository at this point in the history
Update ethereumjs-util to 5.1.3
  • Loading branch information
axic authored Jan 12, 2018
2 parents f0d7cfa + f1a8db6 commit 869f832
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/opFns.js
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ function memLoad (runState, offset, length) {

// shortcut
if (length.isZero()) {
return new Buffer('')
return Buffer.alloc(0)
}

// NOTE: in theory this could overflow, but unlikely due to OOG above
Expand Down Expand Up @@ -1023,7 +1023,7 @@ function makeCall (runState, callOptions, localOpts, cb) {
callOptions.depth = runState.depth + 1

// empty the return data buffer
runState.lastReturned = new Buffer([])
runState.lastReturned = Buffer.alloc(0)

// check if account has enough ether
// Note: in the case of delegatecall, the value is persisted and doesn't need to be deducted again
Expand Down
2 changes: 1 addition & 1 deletion lib/precompiled/01-ecrecover.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function (opts) {

var publicKey
try {
publicKey = utils.ecrecover(msgHash, v, r, s)
publicKey = utils.ecrecover(msgHash, new BN(v).toNumber(), r, s)
} catch (e) {
return results
}
Expand Down
2 changes: 1 addition & 1 deletion lib/runCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ module.exports = function (opts, cb) {
if (totalGas.lte(gasLimit) && results.return.length <= 24576) {
results.gasUsed = totalGas
} else {
results.return = Buffer.from([])
results.return = Buffer.alloc(0)
// since Homestead
results.exception = 0
err = results.exceptionError = ERROR.OUT_OF_GAS
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ethereum-common": "0.2.0",
"ethereumjs-account": "^2.0.3",
"ethereumjs-block": "~1.7.0",
"ethereumjs-util": "4.5.0",
"ethereumjs-util": "^5.1.3",
"fake-merkle-patricia-tree": "^1.0.1",
"functional-red-black-tree": "^1.0.1",
"merkle-patricia-tree": "^2.1.2",
Expand Down

0 comments on commit 869f832

Please sign in to comment.