From 582a491aa0bcb784ac7b65ebbfb42139945ea703 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Tue, 11 Sep 2018 13:28:44 +0800 Subject: core: timestamp (#98) --- core/crypto_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'core/crypto_test.go') diff --git a/core/crypto_test.go b/core/crypto_test.go index 4fa0e1b..29a45f6 100644 --- a/core/crypto_test.go +++ b/core/crypto_test.go @@ -36,12 +36,11 @@ var myVID = types.ValidatorID{Hash: common.NewRandomHash()} func (s *CryptoTestSuite) prepareBlock(prevBlock *types.Block) *types.Block { acks := make(map[common.Hash]struct{}) - timestamps := make(map[types.ValidatorID]time.Time) - timestamps[myVID] = time.Now().UTC() + now := time.Now().UTC() if prevBlock == nil { return &types.Block{ - Acks: acks, - Timestamps: timestamps, + Acks: acks, + Timestamp: now, Notary: types.Notary{ Timestamp: time.Now(), Height: 0, @@ -55,7 +54,7 @@ func (s *CryptoTestSuite) prepareBlock(prevBlock *types.Block) *types.Block { return &types.Block{ ParentHash: prevBlock.Hash, Acks: acks, - Timestamps: timestamps, + Timestamp: now, Position: types.Position{ Height: prevBlock.Position.Height + 1, }, -- cgit v1.2.3