aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-08-01 11:47:05 +0800
committerGitHub <noreply@github.com>2018-08-01 11:47:05 +0800
commitf4498cc6ce554e1a4d4cf164fa1b2eac4e31f871 (patch)
tree0f28469adce9adeadf6816682d7f51c17405fc82 /simulation
parentea2d10b0c7874e6c1d3dd1cf2487ad2525ebb59c (diff)
downloadtangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.tar
tangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.tar.gz
tangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.tar.bz2
tangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.tar.lz
tangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.tar.xz
tangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.tar.zst
tangerine-consensus-f4498cc6ce554e1a4d4cf164fa1b2eac4e31f871.zip
Remove timestamp generating function in validator (#25)
Diffstat (limited to 'simulation')
-rw-r--r--simulation/validator.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/simulation/validator.go b/simulation/validator.go
index fb8afed..97412b1 100644
--- a/simulation/validator.go
+++ b/simulation/validator.go
@@ -123,12 +123,6 @@ func (v *Validator) MsgServer() {
}
}
-func (v *Validator) createBlockTimestamps() map[types.ValidatorID]time.Time {
- timestamps := make(map[types.ValidatorID]time.Time)
- timestamps[v.GetID()] = time.Now()
- return timestamps
-}
-
// BroadcastGenesisBlock broadcasts genesis block to all peers.
func (v *Validator) BroadcastGenesisBlock() {
// Wait until all peer joined the network.
@@ -143,7 +137,6 @@ func (v *Validator) BroadcastGenesisBlock() {
ParentHash: hash,
Hash: hash,
Height: 0,
- Timestamps: v.createBlockTimestamps(),
Acks: map[common.Hash]struct{}{},
}
v.genesis = b
@@ -177,7 +170,6 @@ ProposingBlockLoop:
ParentHash: v.current.Hash,
Hash: common.NewRandomHash(),
Height: v.current.Height + 1.,
- Timestamps: v.createBlockTimestamps(),
Acks: map[common.Hash]struct{}{},
}
v.current = block