Skip to content

Commit

Permalink
Pass fork parameter to the VM in test runner, updated API in README
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerd77 committed Jun 22, 2018
1 parent f678ea6 commit 3eafdd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ Creates a new VM object
- `stateManager` - A state manager instance (**EXPERIMENTAL** - unstable API)
- `state` - A merkle-patricia-tree instance for the state tree (ignored if `stateManager` is passed)
- `blockchain` - A blockchain object for storing/retrieving blocks (ignored if `stateManager` is passed)
- `chain` - The chain the VM operates on [default: 'mainnet']
- `hardfork` - Hardfork rules to be used [default: 'byzantium', supported: 'byzantium']
- `activatePrecompiles` - Create entries in the state tree for the precompiled contracts
- `allowUnlimitedContractSize` - Allows unlimited contract sizes while debugging. By setting this to `true`, the check for contract size limit of 2KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. (default: `false`; **ONLY** set to `true` during debugging).

Expand Down
3 changes: 2 additions & 1 deletion tests/BlockchainTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ module.exports = function runBlockchainTest (options, testData, t, cb) {
}
var vm = new VM({
state: state,
blockchain: blockchain
blockchain: blockchain,
hardfork: options.forkConfig.toLowerCase()
})
var genesisBlock = new Block()

Expand Down
3 changes: 2 additions & 1 deletion tests/GeneralStateTestsRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function runTestCase (options, testData, t, cb) {
VM = require('../lib/index.js')
}
vm = new VM({
state: state
state: state,
hardfork: options.forkConfig.toLowerCase()
})
testUtil.setupPreConditions(state, testData, done)
},
Expand Down

0 comments on commit 3eafdd5

Please sign in to comment.