diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-08 11:57:22 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:18 +0800 |
commit | 17940c070806f5eba28610550d8c03870a61a511 (patch) | |
tree | 535d79201bbba29175b89bb861f07ef40bb824cb /vendor/github.com/dexon-foundation/dexon-consensus/core/lattice.go | |
parent | 09869e66e5d13216fbab95044ab5643166c5d58d (diff) | |
download | go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.gz go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.bz2 go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.lz go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.xz go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.zst go-tangerine-17940c070806f5eba28610550d8c03870a61a511.zip |
vendor: sync to latest core
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 } |