Skip to content

Commit 713de1a

Browse files
authored
Merge branch 'master' into cleanup-run-transactions-simple
2 parents 6ae8da6 + e223587 commit 713de1a

File tree

4 files changed

+6
-52
lines changed

4 files changed

+6
-52
lines changed

.travis.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"coverage": "nyc npm run coverageTests && nyc report --reporter=text-lcov > .nyc_output/lcov.info",
1111
"coverageTests": "tape ./tests/api/*.js ./tests/tester.js -s",
12-
"coveralls": "npm run coverage && coveralls <.nyc_output/lcov.info",
12+
"coveralls": "npm run coverage && if [ -n \"$COVERALLS_REPO_TOKEN\" ]; then coveralls <.nyc_output/lcov.info; fi",
1313
"testVM": "node ./tests/tester -v",
1414
"testStateByzantium": "npm run build:dist && node ./tests/tester -s --fork='Byzantium' --dist",
1515
"testStateConstantinople": "npm run build:dist && node ./tests/tester -s --fork='Constantinople' --dist",

tests/cacheTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tape('test the cache api', function (t) {
1010
t.test('should have the correct value in the cache ', function (st) {
1111
var account1 = {
1212
address: Buffer.from('cd2a3d9f938e13cd947ec05abc7fe734df8dd826', 'hex'),
13-
key: ethUtil.sha3('cow')
13+
key: ethUtil.keccak256('cow')
1414
}
1515

1616
/*

tests/util.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ exports.verifyPostConditions = function (state, testData, t, cb) {
118118
var keyMap = {}
119119

120120
for (var key in testData) {
121-
var hash = utils.sha3(Buffer.from(utils.stripHexPrefix(key), 'hex')).toString('hex')
121+
var hash = utils.keccak256(Buffer.from(utils.stripHexPrefix(key), 'hex')).toString('hex')
122122
hashedAccounts[hash] = testData[key]
123123
keyMap[hash] = key
124124
}
@@ -182,7 +182,7 @@ exports.verifyAccountPostConditions = function (state, address, account, acctDat
182182

183183
var hashedStorage = {}
184184
for (var key in acctData.storage) {
185-
hashedStorage[utils.sha3(utils.setLength(Buffer.from(key.slice(2), 'hex'), 32)).toString('hex')] = acctData.storage[key]
185+
hashedStorage[utils.keccak256(utils.setLength(Buffer.from(key.slice(2), 'hex'), 32)).toString('hex')] = acctData.storage[key]
186186
}
187187

188188
if (storageKeys.length > 0) {
@@ -286,12 +286,12 @@ exports.fromAddress = function (hexString) {
286286
}
287287

288288
/**
289-
* toCodeHash - applies sha3 to hexCode
289+
* toCodeHash - applies keccak256 to hexCode
290290
* @param {String} hexCode string from tests repo
291291
* @returns {Buffer}
292292
*/
293293
exports.toCodeHash = function (hexCode) {
294-
return utils.sha3(Buffer.from(hexCode.slice(2), 'hex'))
294+
return utils.keccak256(Buffer.from(hexCode.slice(2), 'hex'))
295295
}
296296

297297
exports.makeBlockHeader = function (data) {

0 commit comments

Comments
 (0)