Skip to content

Commit f63c5b9

Browse files
authored
Merge pull request ethereumjs#369 from ethereumjs/test-ethereumjs-util-v600
Update of ethereumjs-util to v6.0.0
2 parents 9a3dc04 + 32f4907 commit f63c5b9

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

lib/hooked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function createHookedVm (opts, hooks) {
5959
results._exists = results.nonce !== '0x0' || results.balance !== '0x0' || results._code !== '0x'
6060
// console.log('fetch account results:', results)
6161
var account = new Account(results)
62-
// not used but needs to be anything but the default (ethUtil.SHA3_NULL)
62+
// not used but needs to be anything but the default (ethUtil.KECCAK256_NULL)
6363
// code lookups are handled by `codeStore`
6464
account.codeHash = ZERO_BUFFER.slice()
6565
cb(null, account)

lib/stateManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ proto.accountIsEmpty = function (address, cb) {
296296
return cb(err)
297297
}
298298

299-
cb(null, account.nonce.toString('hex') === '' && account.balance.toString('hex') === '' && account.codeHash.toString('hex') === utils.SHA3_NULL_S)
299+
cb(null, account.nonce.toString('hex') === '' && account.balance.toString('hex') === '' && account.codeHash.toString('hex') === utils.KECCAK256_NULL_S)
300300
})
301301
}
302302

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ethereumjs-account": "^2.0.3",
4040
"ethereumjs-block": "~2.0.1",
4141
"ethereumjs-common": "~0.4.0",
42-
"ethereumjs-util": "^5.2.0",
42+
"ethereumjs-util": "^6.0.0",
4343
"fake-merkle-patricia-tree": "^1.0.1",
4444
"functional-red-black-tree": "^1.0.1",
4545
"merkle-patricia-tree": "^2.1.2",

tests/api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ tape('VM with fake blockchain', (t) => {
1111
t.test('should insantiate without params', (st) => {
1212
const vm = new VM()
1313
st.ok(vm.stateManager)
14-
st.equal(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
14+
st.deepEqual(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
1515
st.ok(vm.blockchain.fake, 'it has fake blockchain by default')
1616
st.end()
1717
})
@@ -47,7 +47,7 @@ tape('VM with fake blockchain', (t) => {
4747
tape('VM with blockchain', (t) => {
4848
t.test('should instantiate', (st) => {
4949
const vm = setupVM()
50-
st.equal(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
50+
st.deepEqual(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
5151
st.notOk(vm.stateManager.fake, 'it doesn\'t have fake blockchain')
5252
st.end()
5353
})

tests/api/stateManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ tape('StateManager', (t) => {
88
t.test('should instantiate', (st) => {
99
const stateManager = new StateManager()
1010

11-
st.equal(stateManager.trie.root, util.KECCAK256_RLP, 'it has default root')
11+
st.deepEqual(stateManager.trie.root, util.KECCAK256_RLP, 'it has default root')
1212
stateManager.getStateRoot((err, res) => {
1313
st.error(err, 'getStateRoot returns no error')
14-
st.equal(res, util.KECCAK256_RLP, 'it has default root')
14+
st.deepEqual(res, util.KECCAK256_RLP, 'it has default root')
1515
})
1616

1717
st.equal(stateManager._common.hardfork(), 'byzantium', 'it has default hardfork')

0 commit comments

Comments
 (0)