aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus-timestamp_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-20 09:09:37 +0800
committerGitHub <noreply@github.com>2018-09-20 09:09:37 +0800
commit421d72b2d796195178104a0eb1dedf319ba8664c (patch)
treef32f15c167989905494eca1891c3240b80dac1d6 /core/consensus-timestamp_test.go
parent37f117d35c6617e1944d45e001e03813a6a278ed (diff)
downloaddexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.gz
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.bz2
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.lz
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.xz
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.zst
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.zip
Rename validator* to node* (#120)
Diffstat (limited to 'core/consensus-timestamp_test.go')
-rw-r--r--core/consensus-timestamp_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/consensus-timestamp_test.go b/core/consensus-timestamp_test.go
index a5f9fb7..be90f41 100644
--- a/core/consensus-timestamp_test.go
+++ b/core/consensus-timestamp_test.go
@@ -91,7 +91,7 @@ func (s *ConsensusTimestampTest) extractTimestamps(
// should have the same result as processing the whole chain at once.
func (s *ConsensusTimestampTest) TestTimestampPartition() {
blockNums := []int{50, 100, 30}
- validatorNum := 19
+ chainNum := 19
sigma := 100 * time.Millisecond
totalTimestamps := make([]time.Time, 0)
ct := newConsensusTimestamp()
@@ -100,7 +100,7 @@ func (s *ConsensusTimestampTest) TestTimestampPartition() {
totalBlockNum += blockNum
}
totalChain := s.generateBlocksWithTimestamp(
- totalBlockNum, validatorNum, time.Second, sigma)
+ totalBlockNum, chainNum, time.Second, sigma)
for _, blockNum := range blockNums {
var chain []*types.Block
chain, totalChain = totalChain[:blockNum], totalChain[blockNum:]
@@ -118,10 +118,10 @@ func (s *ConsensusTimestampTest) TestTimestampPartition() {
}
func (s *ConsensusTimestampTest) TestTimestampIncrease() {
- validatorNum := 19
+ chainNum := 19
sigma := 100 * time.Millisecond
ct := newConsensusTimestamp()
- chain := s.generateBlocksWithTimestamp(1000, validatorNum, time.Second, sigma)
+ chain := s.generateBlocksWithTimestamp(1000, chainNum, time.Second, sigma)
err := ct.processBlocks(chain)
s.Require().NoError(err)
timestamps := s.extractTimestamps(chain)