@@ -5,7 +5,6 @@ const rlp = utils.rlp
5
5
const Account = require ( 'ethereumjs-account' )
6
6
const Transaction = require ( 'ethereumjs-tx' )
7
7
const Block = require ( 'ethereumjs-block' )
8
- const Header = require ( 'ethereumjs-block/header.js' )
9
8
10
9
exports . dumpState = function ( state , cb ) {
11
10
var rs = state . createReadStream ( )
@@ -251,7 +250,7 @@ exports.toCodeHash = function (hexCode) {
251
250
}
252
251
253
252
exports . makeBlockHeader = function ( data ) {
254
- var header = new Header ( )
253
+ var header = { }
255
254
header . timestamp = format ( data . currentTimestamp )
256
255
header . gasLimit = format ( data . currentGasLimit )
257
256
if ( data . previousHash ) {
@@ -266,13 +265,15 @@ exports.makeBlockHeader = function (data) {
266
265
/**
267
266
* makeBlockFromEnv - helper to create a block from the env object in tests repo
268
267
* @param {Object } env object from tests repo
268
+ * @param {Object } transactions transactions for the block
269
269
* @return {Object } the block
270
270
*/
271
- exports . makeBlockFromEnv = function ( env ) {
272
- var block = new Block ( )
273
- block . header = exports . makeBlockHeader ( env )
274
-
275
- return block
271
+ exports . makeBlockFromEnv = function ( env , transactions ) {
272
+ return new Block ( {
273
+ header : exports . makeBlockHeader ( env ) ,
274
+ transactions : transactions || { } ,
275
+ uncleHeaders : [ ]
276
+ } )
276
277
}
277
278
278
279
/**
0 commit comments