From 17449ca9402c7130d9587abc6f6764df6ad2e12e Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Sun, 14 Oct 2018 11:03:57 +0800 Subject: core: blocks generation supports rounds (#196) * Block proposing based on timestamp, instead of count of blocks generated. * Add method to find tips of each round in blockdb. * Block proposing based on tips of last round found on blockdb. --- core/lattice-data.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/lattice-data.go') diff --git a/core/lattice-data.go b/core/lattice-data.go index f0bda11..95e0f06 100644 --- a/core/lattice-data.go +++ b/core/lattice-data.go @@ -235,6 +235,8 @@ func (data *latticeData) sanityCheck(b *types.Block) error { if !config.isValidGenesisBlockTime(b) { return ErrIncorrectBlockTime } + // TODO(mission): make sure rounds between chainTip and current block + // don't expect blocks from this chain. } } else { if chainTip.Position.Round != b.Position.Round { -- cgit v1.2.3