Skip to content

Commit

Permalink
test: fix state test runner with json trace enabled (#438)
Browse files Browse the repository at this point in the history
* Change stateManager.trie to stateManager._trie in GeneralStateTestsRunner

* Use t.fail instead of console logging errors

* add gitignore

* Remove t.fail
  • Loading branch information
chikeichan authored and s1na committed Feb 19, 2019
1 parent 0232a2e commit b03957c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Network Trash Folder
Temporary Items
.apdisk

### IDE ###
.idea

### Node ###
# Logs
Expand Down
3 changes: 3 additions & 0 deletions tests/BlockchainTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ module.exports = function runBlockchainTest (options, testData, t, cb) {
cb(err)
})
} catch (err) {
if (err) {
t.fail(err)
}
cb()
}
}, function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/GeneralStateTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function runTestCase (options, testData, t, cb) {
})
vm.on('afterTx', function (results) {
let stateRoot = {
'stateRoot': results.vm.runState.stateManager.trie.root.toString('hex')
'stateRoot': results.vm.runState.stateManager._trie.root.toString('hex')
}
t.comment(JSON.stringify(stateRoot))
})
Expand Down

0 comments on commit b03957c

Please sign in to comment.