Health Status
Health status of a drand network, indicating how up-to-date it is.
The health status compares the current round the network is at versus the expected round based on the chain's period and genesis time. This helps detect if the network is falling behind or has stopped producing beacons.
Health Indicators
Healthy:
current >= expected- Network is on time or aheadBehind:
current < expected- Network is delayedGap size:
expected - currentshows how many rounds behind
Usage
val health = api.health("quicknet").getOrThrow()
when {
health.current >= health.expected ->
println("Network is healthy")
health.current < health.expected ->
println("Network is ${health.expected - health.current} rounds behind")
}Content copied to clipboard