diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-10-14 11:03:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-14 11:03:57 +0800 |
commit | 17449ca9402c7130d9587abc6f6764df6ad2e12e (patch) | |
tree | 2b64da64e088fc51bd33f424fdaab74a065a09ed /core/lattice-data.go | |
parent | bb800319674e8a0f22769ae4af668c66e9536b15 (diff) | |
download | dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.tar dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.tar.gz dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.tar.bz2 dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.tar.lz dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.tar.xz dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.tar.zst dexon-consensus-17449ca9402c7130d9587abc6f6764df6ad2e12e.zip |
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.
Diffstat (limited to 'core/lattice-data.go')
-rw-r--r-- | core/lattice-data.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |