aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-11-08 11:57:22 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:53 +0800
commit50dae389e78fd24a8d8728e95e22a337dc1d1fd0 (patch)
tree66b2c6c0827e34f3ae15f207af4a55d14d57b571 /vendor/github.com/dexon-foundation/dexon-consensus/core/consensus-timestamp.go
parentdd2e293f8dfced342cec8e709099b201687f4638 (diff)
downloaddexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.tar
dexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.tar.gz
dexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.tar.bz2
dexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.tar.lz
dexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.tar.xz
dexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.tar.zst
dexon-50dae389e78fd24a8d8728e95e22a337dc1d1fd0.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.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},