mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 23:30:36 +00:00
21 lines
423 B
Go
21 lines
423 B
Go
|
package stateroot
|
||
|
|
||
|
import "github.com/prometheus/client_golang/prometheus"
|
||
|
|
||
|
// stateHeight prometheus metric.
|
||
|
var stateHeight = prometheus.NewGauge(
|
||
|
prometheus.GaugeOpts{
|
||
|
Help: "Current verified state height",
|
||
|
Name: "current_state_height",
|
||
|
Namespace: "neogo",
|
||
|
},
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
prometheus.MustRegister(stateHeight)
|
||
|
}
|
||
|
|
||
|
func updateStateHeightMetric(sHeight uint32) {
|
||
|
stateHeight.Set(float64(sHeight))
|
||
|
}
|