File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/main/scala/io/iohk/ethereum/ledger Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class BlockImport(
73
73
)
74
74
75
75
if (importedBlocks.nonEmpty) {
76
- importedBlocks.map (blockData => BlockMetrics .measure(blockData.block, blockchain.getBlockByHash))
76
+ importedBlocks.foreach (blockData => BlockMetrics .measure(blockData.block, blockchain.getBlockByHash))
77
77
}
78
78
79
79
result
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ case object BlockMetrics extends MetricsContainer {
9
9
10
10
private [this ] final val BlockNumberGauge =
11
11
metrics.registry.gauge(" sync.block.number.gauge" , new AtomicDouble (0d ))
12
+ private [this ] final val CheckpointBlockNumberGauge =
13
+ metrics.registry.gauge(" sync.block.checkpoint.number.gauge" , new AtomicDouble (0d ))
12
14
private [this ] final val BlockGasLimitGauge =
13
15
metrics.registry.gauge(" sync.block.gasLimit.gauge" , new AtomicDouble (0d ))
14
16
private [this ] final val BlockGasUsedGauge =
@@ -24,6 +26,8 @@ case object BlockMetrics extends MetricsContainer {
24
26
25
27
def measure (block : Block , getBlockByHashFn : ByteString => Option [Block ]): Unit = {
26
28
BlockNumberGauge .set(block.number.toDouble)
29
+ if (block.hasCheckpoint)
30
+ CheckpointBlockNumberGauge .set(block.number.toDouble)
27
31
BlockGasLimitGauge .set(block.header.gasLimit.toDouble)
28
32
BlockGasUsedGauge .set(block.header.gasUsed.toDouble)
29
33
BlockDifficultyGauge .set(block.header.difficulty.toDouble)
You can’t perform that action at this time.
0 commit comments