aboutsummaryrefslogtreecommitdiffstats
path: root/integration_test
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-10-02 17:21:00 +0800
committerGitHub <noreply@github.com>2018-10-02 17:21:00 +0800
commita6e8ee4d4800a1978eb474a01091f83937743718 (patch)
tree4422790e1c739d7fb9e10e107982f67e1b743e7a /integration_test
parentd34f6b070e7361fcb582350ad8faf6148e82042e (diff)
downloaddexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar
dexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.gz
dexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.bz2
dexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.lz
dexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.xz
dexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.tar.zst
dexon-consensus-a6e8ee4d4800a1978eb474a01091f83937743718.zip
core: remove shard (#161)
Diffstat (limited to 'integration_test')
-rw-r--r--integration_test/node.go14
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.