diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-02 10:44:15 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:17 +0800 |
commit | 7ef2bd6a1544d3b92cf2b2119935b425279b4e59 (patch) | |
tree | 6abf75e0ca0ac2f27846c9441ca9446f2ee36425 /vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go | |
parent | ace78f3a2804f2f4953f3ad9b945a4dbea221ac7 (diff) | |
download | go-tangerine-7ef2bd6a1544d3b92cf2b2119935b425279b4e59.tar.gz go-tangerine-7ef2bd6a1544d3b92cf2b2119935b425279b4e59.tar.zst go-tangerine-7ef2bd6a1544d3b92cf2b2119935b425279b4e59.zip |
vendor: sync to latest core
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go b/vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go index 68b05c2e6..c1339beed 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus-core/core/lattice.go @@ -36,7 +36,6 @@ var ( type Lattice struct { lock sync.RWMutex authModule *Authenticator - chainNum uint32 app Application debug Debug pool blockPool @@ -61,7 +60,6 @@ func NewLattice( toConfig := newGenesisTotalOrderingConfig(dMoment, cfg) s = &Lattice{ authModule: authModule, - chainNum: cfg.NumChains, app: app, debug: debug, pool: newBlockPool(cfg.NumChains), @@ -180,7 +178,7 @@ func (s *Lattice) addBlockToLattice( // Replay tips in pool to check their validity. for { hasOutput := false - for i := uint32(0); i < s.chainNum; i++ { + for i := uint32(0); i < uint32(len(s.pool)); i++ { var tip *types.Block if tip = s.pool.tip(i); tip == nil { continue |