diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-10-02 17:21:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-02 17:21:00 +0800 |
commit | a6e8ee4d4800a1978eb474a01091f83937743718 (patch) | |
tree | 4422790e1c739d7fb9e10e107982f67e1b743e7a /integration_test | |
parent | d34f6b070e7361fcb582350ad8faf6148e82042e (diff) | |
download | tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.gz tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.bz2 tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.lz tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.xz tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.zst tangerine-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.zip |
core: remove shard (#161)
Diffstat (limited to 'integration_test')
-rw-r--r-- | integration_test/node.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/integration_test/node.go b/integration_test/node.go index 2fa3eb6..62901d6 100644 --- a/integration_test/node.go +++ b/integration_test/node.go @@ -67,7 +67,7 @@ type Node struct { ID types.NodeID chainNum uint32 chainID uint32 - shard *core.Shard + lattice *core.Lattice app *test.App db blockdb.BlockDatabase broadcastTargets map[types.NodeID]struct{} @@ -114,7 +114,7 @@ func NewNode( proposingLatency: proposingLatency, app: app, db: db, - shard: core.NewShard( + lattice: core.NewLattice( governanceConfig, core.NewAuthenticator(privateKey), app, @@ -173,19 +173,19 @@ func (n *Node) prepareBlock(when time.Time) (b *types.Block, err error) { Position: types.Position{ ChainID: n.chainID, }} - err = n.shard.PrepareBlock(b, when) + err = n.lattice.PrepareBlock(b, when) return } func (n *Node) processBlock(b *types.Block) (err error) { - // TODO(mission): this segment of code is identical to testShardMgr in - // core/shard_test.go, except the compaction-chain part. + // TODO(mission): this segment of code is identical to testLatticeMgr in + // core/lattice_test.go, except the compaction-chain part. var ( delivered []*types.Block verified []*types.Block pendings = []*types.Block{b} ) - if err = n.shard.SanityCheck(b); err != nil { + if err = n.lattice.SanityCheck(b); err != nil { if err == core.ErrAckingBlockNotExists { err = nil } @@ -196,7 +196,7 @@ func (n *Node) processBlock(b *types.Block) (err error) { break } b, pendings = pendings[0], pendings[1:] - if verified, delivered, err = n.shard.ProcessBlock(b); err != nil { + if verified, delivered, err = n.lattice.ProcessBlock(b); err != nil { return } // Deliver blocks. |