@ -63,18 +63,24 @@ public class DefaultMutableBlockchain implements MutableBlockchain {
chainHeader = blockchainStorage . getBlockHeader ( chainHead ) . get ( ) ;
chainHeader = blockchainStorage . getBlockHeader ( chainHead ) . get ( ) ;
totalDifficulty = blockchainStorage . getTotalDifficulty ( chainHead ) . get ( ) ;
totalDifficulty = blockchainStorage . getTotalDifficulty ( chainHead ) . get ( ) ;
metricsSystem . createGauge (
metricsSystem . createLong Gauge (
MetricCategory . BLOCKCHAIN ,
MetricCategory . BLOCKCHAIN ,
"height" ,
"height" ,
"Height of the chainhead" ,
"Height of the chainhead" ,
( ) - > ( double ) this . getChainHeadBlockNumber ( ) ) ;
this : : getChainHeadBlockNumber ) ;
metricsSystem . createGauge (
metricsSystem . createLong Gauge (
MetricCategory . BLOCKCHAIN ,
MetricCategory . BLOCKCHAIN ,
"difficulty_total" ,
"difficulty_total" ,
"Total difficulty of the chainhead" ,
"Total difficulty of the chainhead" ,
( ) - >
( ) - >
BytesValues . asUnsignedBigInteger ( this . getChainHead ( ) . getTotalDifficulty ( ) . getBytes ( ) )
BytesValues . asUnsignedBigInteger ( this . getChainHead ( ) . getTotalDifficulty ( ) . getBytes ( ) )
. doubleValue ( ) ) ;
. longValue ( ) ) ;
metricsSystem . createLongGauge (
MetricCategory . BLOCKCHAIN ,
"chain_head_timestamp" ,
"Timestamp from the current chain head" ,
( ) - > getChainHeadHeader ( ) . getTimestamp ( ) ) ;
}
}
@Override
@Override