mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Add optimistic_sync metric (#8059)
* #7974 Display `0` if optimistic sync and `1` for normal sync Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io> Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>
This commit is contained in:
@@ -369,8 +369,12 @@ pub fn spawn_notifier<T: BeaconChainTypes>(
|
||||
|
||||
let block_hash = match beacon_chain.canonical_head.head_execution_status() {
|
||||
Ok(ExecutionStatus::Irrelevant(_)) => "n/a".to_string(),
|
||||
Ok(ExecutionStatus::Valid(hash)) => format!("{} (verified)", hash),
|
||||
Ok(ExecutionStatus::Valid(hash)) => {
|
||||
metrics::set_gauge(&metrics::IS_OPTIMISTIC_SYNC, 0);
|
||||
format!("{} (verified)", hash)
|
||||
}
|
||||
Ok(ExecutionStatus::Optimistic(hash)) => {
|
||||
metrics::set_gauge(&metrics::IS_OPTIMISTIC_SYNC, 1);
|
||||
warn!(
|
||||
info = "chain not fully verified, \
|
||||
block and attestation production disabled until execution engine syncs",
|
||||
|
||||
Reference in New Issue
Block a user