diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/blockchain.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 8c441eb19..ee8d7b96c 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1956,13 +1956,12 @@ func (bc *BlockChain) ProcessEmptyBlock(block *types.Block) (*common.Hash, error } header.ParentHash = parentBlock.Hash() - header.GasUsed = 0 - header.Root = currentState.IntermediateRoot(true) + newBlock, err := bc.engine.Finalize(bc, header, currentState, nil, nil, nil) + if header.Root != parentBlock.Root() { return nil, fmt.Errorf("empty block state root must same as parent") } - newBlock := types.NewBlock(header, nil, nil, nil) root := newBlock.Root() if _, ok := bc.GetRoundHeight(newBlock.Round()); !ok { bc.storeRoundHeight(newBlock.Round(), newBlock.NumberU64()) |