Browse Source

check if block was created after timeStart

pull/1943/head
Anton Kaliaev 6 years ago
parent
commit
52d3eca67c
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      tm-bench/main.go

+ 5
- 0
tm-bench/main.go View File

@ -135,6 +135,11 @@ func calculateStatistics(client tmrpc.Client, minHeight int64, timeStart, timeSt
numBlocksPerSec := make(map[int64]int64)
numTxsPerSec := make(map[int64]int64)
for _, blockMeta := range info.BlockMetas {
// check if block was created after timeStart
if blockMeta.Header.Time.Before(timeStart) {
continue
}
// check if block was created before timeStop
if blockMeta.Header.Time.After(timeStop) {
break


Loading…
Cancel
Save