Skip to content

Commit

Permalink
Merge pull request #369 from ethereumjs/test-ethereumjs-util-v600
Browse files Browse the repository at this point in the history
Update of ethereumjs-util to v6.0.0
  • Loading branch information
holgerd77 authored Oct 10, 2018
2 parents 9a3dc04 + 32f4907 commit f63c5b9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/hooked.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function createHookedVm (opts, hooks) {
results._exists = results.nonce !== '0x0' || results.balance !== '0x0' || results._code !== '0x'
// console.log('fetch account results:', results)
var account = new Account(results)
// not used but needs to be anything but the default (ethUtil.SHA3_NULL)
// not used but needs to be anything but the default (ethUtil.KECCAK256_NULL)
// code lookups are handled by `codeStore`
account.codeHash = ZERO_BUFFER.slice()
cb(null, account)
Expand Down
2 changes: 1 addition & 1 deletion lib/stateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ proto.accountIsEmpty = function (address, cb) {
return cb(err)
}

cb(null, account.nonce.toString('hex') === '' && account.balance.toString('hex') === '' && account.codeHash.toString('hex') === utils.SHA3_NULL_S)
cb(null, account.nonce.toString('hex') === '' && account.balance.toString('hex') === '' && account.codeHash.toString('hex') === utils.KECCAK256_NULL_S)
})
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ethereumjs-account": "^2.0.3",
"ethereumjs-block": "~2.0.1",
"ethereumjs-common": "~0.4.0",
"ethereumjs-util": "^5.2.0",
"ethereumjs-util": "^6.0.0",
"fake-merkle-patricia-tree": "^1.0.1",
"functional-red-black-tree": "^1.0.1",
"merkle-patricia-tree": "^2.1.2",
Expand Down
4 changes: 2 additions & 2 deletions tests/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tape('VM with fake blockchain', (t) => {
t.test('should insantiate without params', (st) => {
const vm = new VM()
st.ok(vm.stateManager)
st.equal(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
st.deepEqual(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
st.ok(vm.blockchain.fake, 'it has fake blockchain by default')
st.end()
})
Expand Down Expand Up @@ -47,7 +47,7 @@ tape('VM with fake blockchain', (t) => {
tape('VM with blockchain', (t) => {
t.test('should instantiate', (st) => {
const vm = setupVM()
st.equal(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
st.deepEqual(vm.stateManager.trie.root, util.KECCAK256_RLP, 'it has default trie')
st.notOk(vm.stateManager.fake, 'it doesn\'t have fake blockchain')
st.end()
})
Expand Down
4 changes: 2 additions & 2 deletions tests/api/stateManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ tape('StateManager', (t) => {
t.test('should instantiate', (st) => {
const stateManager = new StateManager()

st.equal(stateManager.trie.root, util.KECCAK256_RLP, 'it has default root')
st.deepEqual(stateManager.trie.root, util.KECCAK256_RLP, 'it has default root')
stateManager.getStateRoot((err, res) => {
st.error(err, 'getStateRoot returns no error')
st.equal(res, util.KECCAK256_RLP, 'it has default root')
st.deepEqual(res, util.KECCAK256_RLP, 'it has default root')
})

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

0 comments on commit f63c5b9

Please sign in to comment.