From f500ef0a50518133ef679f7d3f9c41d8d11bcbf5 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Wed, 27 Mar 2019 13:17:22 +0800 Subject: core: fix finalize logic (#302) --- consensus/dexcon/dexcon.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'consensus') 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 -- cgit v1.2.3