diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-08 11:57:22 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:18 +0800 |
commit | 17940c070806f5eba28610550d8c03870a61a511 (patch) | |
tree | 535d79201bbba29175b89bb861f07ef40bb824cb /vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go | |
parent | 09869e66e5d13216fbab95044ab5643166c5d58d (diff) | |
download | go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.gz go-tangerine-17940c070806f5eba28610550d8c03870a61a511.tar.zst go-tangerine-17940c070806f5eba28610550d8c03870a61a511.zip |
vendor: sync to latest core
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.go | 7 |
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}, |