Skip to content

Commit

Permalink
Merge pull request #373 from ethereumjs/update-blockchain-test-format
Browse files Browse the repository at this point in the history
Added usage of sealEngine to blockchain tests
  • Loading branch information
holgerd77 committed Oct 23, 2018
2 parents e24909e + 34e29a9 commit 09906e0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/BlockchainTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ module.exports = function runBlockchainTest (options, testData, t, cb) {
db: require('memdown')
})
var state = new Trie()
var validate = false
// Only run with block validation when sealEngine present in test file
// and being set to Ethash PoW validation
if (testData.sealEngine && testData.sealEngine === 'Ethash') {
validate = true
}
var blockchain = new Blockchain({
db: blockchainDB,
hardfork: options.forkConfig.toLowerCase()
hardfork: options.forkConfig.toLowerCase(),
validate: validate
})
blockchain.ethash.cacheDB = cacheDB
if (validate) {
blockchain.ethash.cacheDB = cacheDB
}
var VM
if (options.dist) {
VM = require('../dist/index.js')
Expand Down

0 comments on commit 09906e0

Please sign in to comment.