[Bug] get_transaction_receipt hangs forever sometimes
- Lenguaje dominante
- Rust
- Estrellas
- 1.3k
- Forks
- 668
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 29
Descripción
### Component
rpc, provider, pubsub
### What version of Alloy are you on?
1.0.35
### Operating System
None
### Describe the bug
`let query_provider = ProviderBuilder::new()
.connect_http(rpc_url);
let mut receipt = None;
for i in 1..=10 {
info!("{}/10 start waiting", i);
sleep(Duration::from_secs(5)).await;
info!("{}/10 fetch result...", i);
match query_provider.get_transaction_receipt(tx_hash).await {
Ok(Some(t)) => {
receipt = Some(t);
info!("✅ trans confirmed!");
break;
}
Ok(None) => {
info!("trans unconfirmed,5s later retry...");
}
Err(e) => {
error!("error: {}, 5s later retry...", e);
}
}
info!("turn end");
}`
sometimes the log will stop at **x/10 start waiting**, and sometimes will stop at **x/10 fetch result...**, and sometimes will success. I don't what happened, why the sleep line hangs forever, I use those code in actix_web runtime(based on tokio). please help me, thanks a lot!
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.