diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-27 13:17:22 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-13 18:11:44 +0800 |
commit | 0e51a6d76ea35124af30fc81017ea8ac3775c54c (patch) | |
tree | ab1312a92bfcecb554dab45ff2d4ca5a4be3dac7 /consensus/dexcon | |
parent | c9f40d5e37d64dca63a0d29870e1db3916de1e98 (diff) | |
download | go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.tar go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.tar.gz go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.tar.bz2 go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.tar.lz go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.tar.xz go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.tar.zst go-tangerine-0e51a6d76ea35124af30fc81017ea8ac3775c54c.zip |
core: fix finalize logic (#302)
Diffstat (limited to 'consensus/dexcon')
-rw-r--r-- | consensus/dexcon/dexcon.go | 6 |
1 files changed, 4 insertions, 2 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 |