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

Update ethereumjs-util to 5.1.3 #241

Merged
merged 2 commits into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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