From 184207f61fa1b8675f495ec36b1d95960942dd2e Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Fri, 5 Jan 2024 12:37:11 +0100 Subject: [PATCH] feat(inclusion_monitor): log the error, pass a None --- src/phoenix/inclusion_monitor.rs | 13 ++++++++++++- src/phoenix/inclusion_monitor/loki_client.rs | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/phoenix/inclusion_monitor.rs b/src/phoenix/inclusion_monitor.rs index ccf1bec..26e2125 100644 --- a/src/phoenix/inclusion_monitor.rs +++ b/src/phoenix/inclusion_monitor.rs @@ -376,7 +376,18 @@ pub async fn run_inclusion_monitor( insert_missed_slot(mev_pool, &payload.slot, &payload.block_hash, None).await?; - let log_stats = log_client.payload_logs(payload.slot).await?; + let log_stats = { + match log_client.payload_log_stats(payload.slot).await { + Ok(log_stats) => log_stats, + Err(err) => { + error!( + "error getting payload logs for slot {}: {}", + payload.slot, err + ); + None + } + } + }; let proposer_meta = proposer_label_meta(mev_pool, &payload.proposer_pubkey).await?; let proposer_ip = get_proposer_ip(mev_pool, &payload.proposer_pubkey).await?; diff --git a/src/phoenix/inclusion_monitor/loki_client.rs b/src/phoenix/inclusion_monitor/loki_client.rs index 8d16bed..59ee052 100644 --- a/src/phoenix/inclusion_monitor/loki_client.rs +++ b/src/phoenix/inclusion_monitor/loki_client.rs @@ -99,7 +99,7 @@ impl LokiClient { } } - pub async fn payload_logs(&self, slot: i64) -> anyhow::Result> { + pub async fn payload_log_stats(&self, slot: i64) -> anyhow::Result> { let query = format!( r#"{{app="payload-api"}} |= `"slot":{slot}` |= "block published through beacon node" | json"# );