aboutsummaryrefslogtreecommitdiffstats
path: root/core/lattice.go
diff options
context:
space:
mode:
authorhaoping-ku <haoping.ku@cobinhood.com>2018-11-07 13:41:24 +0800
committerMission Liao <mission.liao@dexon.org>2018-11-07 13:41:24 +0800
commitbcdc444319ca9fe219f27e818ab9ec863d6757ea (patch)
tree30d3f3dcb5b49afadb51f45788f0bf7c0022197f /core/lattice.go
parent3714ebf2f1054d9984d37b89cf17e885a5856532 (diff)
downloaddexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.tar
dexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.tar.gz
dexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.tar.bz2
dexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.tar.lz
dexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.tar.xz
dexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.tar.zst
dexon-consensus-bcdc444319ca9fe219f27e818ab9ec863d6757ea.zip
core: lattice: add round in NewLattice() (#303)
Diffstat (limited to 'core/lattice.go')
-rw-r--r--core/lattice.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/lattice.go b/core/lattice.go
index db13e7e..11412be 100644
--- a/core/lattice.go
+++ b/core/lattice.go
@@ -67,7 +67,7 @@ func NewLattice(
pool: newBlockPool(cfg.NumChains),
data: newLatticeData(db, dataConfig),
toModule: newTotalOrdering(toConfig),
- ctModule: newConsensusTimestamp(dMoment, 0, cfg.NumChains),
+ ctModule: newConsensusTimestamp(dMoment, round, cfg.NumChains),
logger: logger,
}
}
@@ -111,8 +111,8 @@ func (l *Lattice) PrepareEmptyBlock(b *types.Block) (err error) {
// SanityCheck checks the validity of a block.
//
-// If any acking blocks of this block does not exist, Lattice helps caching this
-// block and retries when Lattice.ProcessBlock is called.
+// If any acking block of this block does not exist, Lattice caches this block
+// and retries when Lattice.ProcessBlock is called.
func (l *Lattice) SanityCheck(b *types.Block) (err error) {
if b.IsEmpty() {
// Only need to verify block's hash.