[Bug] get_transaction_receipt hangs forever sometimes
- Lingua principale
- Rust
- Stelle
- 1.3k
- Fork
- 668
- Merge medio
- 2g 2h
- PR unite (30g)
- 29
Descrizione
### 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!
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.