aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus-timestamp_test.go
diff options
context:
space:
mode:
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 a6cc435..49002aa 100644
--- a/core/consensus-timestamp_test.go
+++ b/core/consensus-timestamp_test.go
@@ -94,7 +94,7 @@ func (s *ConsensusTimestampTest) TestTimestampPartition() {
chainNum := 19
sigma := 100 * time.Millisecond
totalTimestamps := make([]time.Time, 0)
- ct := newConsensusTimestamp(uint32(chainNum))
+ ct := newConsensusTimestamp(time.Time{}, uint32(chainNum))
totalBlockNum := 0
for _, blockNum := range blockNums {
totalBlockNum += blockNum
@@ -110,7 +110,7 @@ func (s *ConsensusTimestampTest) TestTimestampPartition() {
totalChain = append(totalChain, chain...)
totalTimestamps = append(totalTimestamps, timestamps...)
}
- ct2 := newConsensusTimestamp(uint32(chainNum))
+ ct2 := newConsensusTimestamp(time.Time{}, uint32(chainNum))
err := ct2.processBlocks(totalChain)
s.Require().NoError(err)
timestamps2 := s.extractTimestamps(totalChain)
@@ -120,7 +120,7 @@ func (s *ConsensusTimestampTest) TestTimestampPartition() {
func (s *ConsensusTimestampTest) TestTimestampIncrease() {
chainNum := 19
sigma := 100 * time.Millisecond
- ct := newConsensusTimestamp(uint32(chainNum))
+ ct := newConsensusTimestamp(time.Time{}, uint32(chainNum))
chain := s.generateBlocksWithTimestamp(1000, chainNum, time.Second, sigma)
err := ct.processBlocks(chain)
s.Require().NoError(err)
@@ -129,7 +129,7 @@ func (s *ConsensusTimestampTest) TestTimestampIncrease() {
s.False(timestamps[i].Before(timestamps[i-1]))
}
// Test if the processBlocks is stable.
- ct2 := newConsensusTimestamp(uint32(chainNum))
+ ct2 := newConsensusTimestamp(time.Time{}, uint32(chainNum))
ct2.processBlocks(chain)
s.Require().NoError(err)
timestamps2 := s.extractTimestamps(chain)