Skip to content

Commit

Permalink
feat(inclusion_monitor): log the error, pass a None
Browse files Browse the repository at this point in the history
  • Loading branch information
alextes committed Jan 5, 2024
1 parent 34be023 commit 184207f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/phoenix/inclusion_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down
2 changes: 1 addition & 1 deletion src/phoenix/inclusion_monitor/loki_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl LokiClient {
}
}

pub async fn payload_logs(&self, slot: i64) -> anyhow::Result<Option<PayloadLogStats>> {
pub async fn payload_log_stats(&self, slot: i64) -> anyhow::Result<Option<PayloadLogStats>> {
let query = format!(
r#"{{app="payload-api"}} |= `"slot":{slot}` |= "block published through beacon node" | json"#
);
Expand Down

0 comments on commit 184207f

Please sign in to comment.