diff options
Diffstat (limited to 'core/consensus-timestamp.go')
-rw-r--r-- | core/consensus-timestamp.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/consensus-timestamp.go b/core/consensus-timestamp.go index 9750a74..833194b 100644 --- a/core/consensus-timestamp.go +++ b/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}, |