diff options
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/lattice.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/lattice.go | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice.go index db13e7eba..6c69d5272 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/lattice.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/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. @@ -153,14 +153,6 @@ func (l *Lattice) SanityCheck(b *types.Block) (err error) { }(); err != nil { return } - // Verify data in application layer. - l.logger.Debug("Calling Application.VerifyBlock", "block", b) - switch l.app.VerifyBlock(b) { - case types.VerifyInvalidBlock: - err = ErrInvalidBlock - case types.VerifyRetryLater: - err = ErrRetrySanityCheckLater - } return } |