diff --git a/cmd/monitor/monitor.go b/cmd/monitor/monitor.go index 3306e2c8..70d70005 100644 --- a/cmd/monitor/monitor.go +++ b/cmd/monitor/monitor.go @@ -140,11 +140,6 @@ var MonitorCmd = &cobra.Command{ from := big.NewInt(0) - // batchSize := *inputBatchSize - // if *inputBatchSize > 0 { - // batchSize = *inputBatchSize - // } - // if the max block is 0, meaning we haven't fetched any blocks, we're going to start with head - batchSize if ms.MaxBlockRetrieved.Cmp(from) == 0 { headBlockMinusBatchSize := new(big.Int).SetUint64(*inputBatchSize + 100 - 1) diff --git a/metrics/metrics.go b/metrics/metrics.go index 72ad8e94..00e56b10 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -40,7 +40,7 @@ func (a SortableBlocks) Swap(i, j int) { a[i], a[j] = a[j], a[i] } func (a SortableBlocks) Less(i, j int) bool { - return a[i].Time() < a[j].Time() + return a[i].Number().Int64() < a[j].Number().Int64() } func GetMeanBlockTime(blocks []rpctypes.PolyBlock) float64 {