Skip to content

Commit

Permalink
Merge pull request #536 from ethereumjs/test/bc-genesis-state
Browse files Browse the repository at this point in the history
Avoid generating genesis state in blockchain test runner
  • Loading branch information
holgerd77 authored May 29, 2019
2 parents c3311b6 + 5be8a1d commit c2a5cec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/BlockchainTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ module.exports = function runBlockchainTest (options, testData, t, cb) {
done()
})
},
function setGenesisStateRoot (done) {
// This is a trick to avoid generating the canonical genesis
// state. Generating the genesis state is not needed because
// blockchain tests come with their own `pre` world state.
// TODO: Add option to `runBlockchain` not to generate genesis state.
vm._common.genesis().stateRoot = state.root
done()
},
function runBlockchain (done) {
vm.runBlockchain(function () {
done()
Expand Down

0 comments on commit c2a5cec

Please sign in to comment.