diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-11-29 09:46:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 09:46:40 +0800 |
commit | 8470ac070f097b261fddc42991a4d2e9ec998db6 (patch) | |
tree | 2aeedc0e2d96937394e7929c8bd4ab1b9ee37240 /integration_test | |
parent | 9ea448b35bfbc12155bf4c286fb5ed657919c1cf (diff) | |
download | dexon-consensus-8470ac070f097b261fddc42991a4d2e9ec998db6.tar.gz dexon-consensus-8470ac070f097b261fddc42991a4d2e9ec998db6.tar.zst dexon-consensus-8470ac070f097b261fddc42991a4d2e9ec998db6.zip |
core: remove StronglyAcked (#347)
Diffstat (limited to 'integration_test')
-rw-r--r-- | integration_test/stats.go | 25 | ||||
-rw-r--r-- | integration_test/stats_test.go | 4 |
2 files changed, 14 insertions, 15 deletions
diff --git a/integration_test/stats.go b/integration_test/stats.go index 311e21a..79f1c20 100644 --- a/integration_test/stats.go +++ b/integration_test/stats.go @@ -17,15 +17,15 @@ var ( // StatsSet represents accumulatee result of a group of related events // (ex. All events from one node). type StatsSet struct { - ProposedBlockCount int - ReceivedBlockCount int - StronglyAckedBlockCount int - TotalOrderedBlockCount int - DeliveredBlockCount int - ProposingLatency time.Duration - ReceivingLatency time.Duration - PrepareExecLatency time.Duration - ProcessExecLatency time.Duration + ProposedBlockCount int + ReceivedBlockCount int + ConfirmedBlockCount int + TotalOrderedBlockCount int + DeliveredBlockCount int + ProposingLatency time.Duration + ReceivingLatency time.Duration + PrepareExecLatency time.Duration + ProcessExecLatency time.Duration } // newBlockProposeEvent accumulates a block proposing event. @@ -59,12 +59,11 @@ func (s *StatsSet) newBlockReceiveEvent( // Find statistics from test.App block := payload.PiggyBack.(*types.Block) app.Check(func(app *test.App) { - // Is this block strongly acked? - if _, exists := app.Acked[block.Hash]; !exists { + // Is this block confirmed? + if _, exists := app.Confirmed[block.Hash]; !exists { return } - s.StronglyAckedBlockCount++ - + s.ConfirmedBlockCount++ // Is this block total ordered? if _, exists := app.TotalOrderedByHash[block.Hash]; !exists { return diff --git a/integration_test/stats_test.go b/integration_test/stats_test.go index 1830501..d61799b 100644 --- a/integration_test/stats_test.go +++ b/integration_test/stats_test.go @@ -42,7 +42,7 @@ func (s *EventStatsTestSuite) TestCalculate() { req.Nil(err) req.True(stats.All.ProposedBlockCount > 350) req.True(stats.All.ReceivedBlockCount > 350) - req.True(stats.All.StronglyAckedBlockCount > 350) + req.True(stats.All.ConfirmedBlockCount > 350) req.True(stats.All.TotalOrderedBlockCount >= 350) req.True(stats.All.DeliveredBlockCount >= 350) req.Equal(stats.All.ProposingLatency, 300*time.Millisecond) @@ -51,7 +51,7 @@ func (s *EventStatsTestSuite) TestCalculate() { for _, vStats := range stats.ByNode { req.True(vStats.ProposedBlockCount > 50) req.True(vStats.ReceivedBlockCount > 50) - req.True(vStats.StronglyAckedBlockCount > 50) + req.True(vStats.ConfirmedBlockCount > 50) req.True(vStats.TotalOrderedBlockCount >= 50) req.True(vStats.DeliveredBlockCount >= 50) req.Equal(vStats.ProposingLatency, 300*time.Millisecond) |