aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/network_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-02-20 12:53:18 +0800
committerGitHub <noreply@github.com>2019-02-20 12:53:18 +0800
commit8ef4fc213703620fbfa13890dee042d40eea8545 (patch)
treeba9a07d2423314396e5677b7294122caa505ae9a /core/test/network_test.go
parent2cf18fd299ea0fc270b213343314cab652cac271 (diff)
downloaddexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar
dexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.gz
dexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.bz2
dexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.lz
dexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.xz
dexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.tar.zst
dexon-consensus-8ef4fc213703620fbfa13890dee042d40eea8545.zip
core: switch round by block height (#450)
Diffstat (limited to 'core/test/network_test.go')
-rw-r--r--core/test/network_test.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/core/test/network_test.go b/core/test/network_test.go
index fd5f97f..22c31a8 100644
--- a/core/test/network_test.go
+++ b/core/test/network_test.go
@@ -90,9 +90,8 @@ func (s *NetworkTestSuite) TestPullRequestMarshaling() {
Requester: GenerateRandomNodeIDs(1)[0],
Type: "vote",
Identity: types.Position{
- Round: 1,
- ChainID: 2,
- Height: 3,
+ Round: 1,
+ Height: 3,
}}
b, err = json.Marshal(req)
s.Require().NoError(err)
@@ -102,8 +101,6 @@ func (s *NetworkTestSuite) TestPullRequestMarshaling() {
s.Require().Equal(req.Type, req2.Type)
s.Require().Equal(req.Identity.(types.Position).Round,
req.Identity.(types.Position).Round)
- s.Require().Equal(req.Identity.(types.Position).ChainID,
- req.Identity.(types.Position).ChainID)
s.Require().Equal(req.Identity.(types.Position).Height,
req.Identity.(types.Position).Height)
}
@@ -197,9 +194,8 @@ func (s *NetworkTestSuite) TestPullVotes() {
v := types.NewVote(
types.VoteInit, common.NewRandomHash(), randObj.Uint64())
v.Position = types.Position{
- ChainID: randObj.Uint32(),
- Height: randObj.Uint64(),
- Round: uint64(randObj.Intn(int(maxRound + 1))),
+ Height: randObj.Uint64(),
+ Round: uint64(randObj.Intn(int(maxRound + 1))),
}
req.NoError(master.trans.Send(n.ID, v))
votes[v.VoteHeader] = v
@@ -262,7 +258,7 @@ func (s *NetworkTestSuite) TestBroadcastToSet() {
dkgSet, err := cache.GetDKGSet(0)
req.NoError(err)
req.Len(dkgSet, 1)
- notarySet, err := cache.GetNotarySet(0, 0)
+ notarySet, err := cache.GetNotarySet(0)
req.NoError(err)
req.Len(notarySet, 1)
var (