Skip to content

Commit

Permalink
fix eth finalized (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Oct 18, 2023
1 parent 83db876 commit 97026e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/extensions/api/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,13 @@ impl EthApi {
if let Err(e) = run.await {
// cannot figure out finalized head
finalized_head_tx.send_replace(None);
tracing::error!("Error in background task: {e}");
if e.to_string().contains("invalid") {
let msg = e.to_string().to_lowercase();
if msg.contains("methodnotfound") || msg.contains("invalid") {
tracing::warn!("finalized head subscription is not supported: {e}");
// finalized head subscription is not supported
break;
}
tracing::error!("Error in background task: {e}");
}
tokio::time::sleep(Duration::from_secs(1)).await;
}
Expand Down

0 comments on commit 97026e5

Please sign in to comment.