core: use headers only where blocks are unnecessary

This commit is contained in:
Péter Szilágyi
2019-03-13 12:31:35 +02:00
parent b87a68407b
commit 4f457859a2
5 changed files with 11 additions and 11 deletions

View File

@ -149,7 +149,7 @@ func testBlockChainImport(chain types.Blocks, blockchain *BlockChain) error {
blockchain.reportBlock(block, receipts, err)
return err
}
err = blockchain.validator.ValidateState(block, blockchain.GetBlockByHash(block.ParentHash()), statedb, receipts, usedGas)
err = blockchain.validator.ValidateState(block, statedb, receipts, usedGas)
if err != nil {
blockchain.reportBlock(block, receipts, err)
return err