diff options
author | haoping-ku <haoping.ku@dexon.org> | 2018-12-03 14:54:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 14:54:17 +0800 |
commit | 2e119344b3ecddd2cf07094c89249ab631901c4f (patch) | |
tree | ded9bc71e725c9cdb7d9e9bc29cb57dd934c3c7c /simulation/verification.go | |
parent | 81c3d2d4446b5daee09529f58bc17cad3284edbf (diff) | |
download | tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.tar tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.tar.gz tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.tar.bz2 tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.tar.lz tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.tar.xz tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.tar.zst tangerine-consensus-2e119344b3ecddd2cf07094c89249ab631901c4f.zip |
simulation: fix confirm latency (#353)
Diffstat (limited to 'simulation/verification.go')
-rw-r--r-- | simulation/verification.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/simulation/verification.go b/simulation/verification.go index f08c73f..a5aad8f 100644 --- a/simulation/verification.go +++ b/simulation/verification.go @@ -77,7 +77,7 @@ func (totalOrder *TotalOrderResult) processStatus(blocks BlockList) { } // PushBlocks push a BlockList into the TotalOrderResult and return true if -// there is new blocks ready for verifiy +// there are new blocks ready for verification. func (totalOrder *TotalOrderResult) PushBlocks(blocks BlockList) (ready bool) { totalOrder.processStatus(blocks) if blocks.ID != totalOrder.curID { @@ -98,7 +98,7 @@ func (totalOrder *TotalOrderResult) PushBlocks(blocks BlockList) (ready bool) { return true } -// PushTimestamp log the information in the msg. +// PushTimestamp logs the information in the msg. func (totalOrder *TotalOrderResult) PushTimestamp(msg timestampMessage) bool { pushLatency := func(latency *[]time.Duration, t1, t2 time.Time) { *latency = append(*latency, t2.Sub(t1)) @@ -220,8 +220,7 @@ func VerifyTotalOrder(id types.NodeID, func LogStatus(peerTotalOrder PeerTotalOrder) { for nID, totalOrder := range peerTotalOrder { log.Printf("[Node %s]\n", nID) - log.Printf(" BPS: %.6f\n", - totalOrder.CalculateBlocksPerSecond()) + log.Printf(" BPS: %.6f\n", totalOrder.CalculateBlocksPerSecond()) log.Printf(" Confirm Latency: %.2fms\n", totalOrder.CalculateAverageConfirmLatency()*1000) log.Printf(" Confirm Blocks: %v\n", len(totalOrder.status.confirmLatency)) |