mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Fixed sync target detection (#11817)
* Fixed sync target detection * Always report sync_target metric * Clamp median across all peers
This commit is contained in:
@@ -298,9 +298,10 @@ impl MetricsService {
|
||||
UniqueSaturatedInto::<u64>::unique_saturated_into(num)
|
||||
});
|
||||
|
||||
if let Some(best_seen_block) = best_seen_block {
|
||||
metrics.block_height.with_label_values(&["sync_target"]).set(best_seen_block);
|
||||
}
|
||||
metrics
|
||||
.block_height
|
||||
.with_label_values(&["sync_target"])
|
||||
.set(best_seen_block.unwrap_or(best_number));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user