@@ -118,7 +118,7 @@ exports.verifyPostConditions = function (state, testData, t, cb) {
118
118
var keyMap = { }
119
119
120
120
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' )
122
122
hashedAccounts [ hash ] = testData [ key ]
123
123
keyMap [ hash ] = key
124
124
}
@@ -182,7 +182,7 @@ exports.verifyAccountPostConditions = function (state, address, account, acctDat
182
182
183
183
var hashedStorage = { }
184
184
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 ]
186
186
}
187
187
188
188
if ( storageKeys . length > 0 ) {
@@ -286,12 +286,12 @@ exports.fromAddress = function (hexString) {
286
286
}
287
287
288
288
/**
289
- * toCodeHash - applies sha3 to hexCode
289
+ * toCodeHash - applies keccak256 to hexCode
290
290
* @param {String } hexCode string from tests repo
291
291
* @returns {Buffer }
292
292
*/
293
293
exports . toCodeHash = function ( hexCode ) {
294
- return utils . sha3 ( Buffer . from ( hexCode . slice ( 2 ) , 'hex' ) )
294
+ return utils . keccak256 ( Buffer . from ( hexCode . slice ( 2 ) , 'hex' ) )
295
295
}
296
296
297
297
exports . makeBlockHeader = function ( data ) {
0 commit comments