SetStartupBlock() sets the block height when the node first completed syncing after startup
(blockHeight uint64)
| 732 | |
| 733 | // SetStartupBlock() sets the block height when the node first completed syncing after startup |
| 734 | func (m *Metrics) SetStartupBlock(blockHeight uint64) { |
| 735 | // exit if empty |
| 736 | if m == nil { |
| 737 | return |
| 738 | } |
| 739 | // only set the startup block metric once per node run |
| 740 | if !m.startupBlockSet { |
| 741 | m.StartupBlock.Set(float64(blockHeight)) |
| 742 | m.startupBlockSet = true |
| 743 | } |
| 744 | } |
| 745 | |
| 746 | func (m *Metrics) UpdateValidatorCount(count int) { |
| 747 | // exit if empty |