core: fix error in chainmakers when engine was not set

This commit is contained in:
Martin Holst Swende 2019-03-20 09:39:33 +01:00
parent 1cc5428c65
commit fa0bcc0ca2
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -96,7 +96,7 @@ func (b *BlockGen) AddTxWithChain(bc *BlockChain, tx *types.Transaction) {
b.SetCoinbase(common.Address{})
}
b.statedb.Prepare(tx.Hash(), common.Hash{}, len(b.txs))
blockContext := NewBlockContext(b.header, bc, nil)
blockContext := NewBlockContext(b.header, bc, &common.Address{})
signer := types.MakeSigner(b.config, b.header.Number)
receipt, _, err := ApplyTransaction(b.config, signer, blockContext, b.gasPool, b.statedb, b.header, tx, &b.header.GasUsed, vm.Config{})
if err != nil {