aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go
index 9750a74c3..833194bd9 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go
@@ -52,9 +52,10 @@ var (
// newConsensusTimestamp creates timestamper object.
func newConsensusTimestamp(
dMoment time.Time, round uint64, numChains uint32) *consensusTimestamp {
- ts := make([]time.Time, 0, numChains)
- for i := uint32(0); i < numChains; i++ {
- ts = append(ts, dMoment)
+
+ ts := make([]time.Time, numChains)
+ for i := range ts {
+ ts[i] = dMoment
}
return &consensusTimestamp{
numChainsOfRounds: []uint32{numChains},