diff options
-rw-r--r-- | consensus/dexcon/dexcon.go | 6 | ||||
-rw-r--r-- | core/blockchain.go | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/consensus/dexcon/dexcon.go b/consensus/dexcon/dexcon.go index 0b6fa192f..4e474bfa3 100644 --- a/consensus/dexcon/dexcon.go +++ b/consensus/dexcon/dexcon.go @@ -208,8 +208,10 @@ func (d *Dexcon) Finalize(chain consensus.ChainReader, header *types.Header, sta gs.MiningHalved() } - // Record last proposed height. - gs.PutLastProposedHeight(header.Coinbase, header.Number) + if header.Coinbase != (common.Address{}) { + // Record last proposed height. + gs.PutLastProposedHeight(header.Coinbase, header.Number) + } header.Root = state.IntermediateRoot(true) return types.NewBlock(header, txs, uncles, receipts), nil diff --git a/core/blockchain.go b/core/blockchain.go index 7a695ac38..3f0e7203e 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1827,10 +1827,6 @@ func (bc *BlockChain) ProcessEmptyBlock(block *types.Block) (*common.Hash, error header.ParentHash = parentBlock.Hash() 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") - } - root := newBlock.Root() if _, ok := bc.GetRoundHeight(newBlock.Round()); !ok { bc.storeRoundHeight(newBlock.Round(), newBlock.NumberU64()) |