[Bug] get_transaction_receipt hangs forever sometimes
- Ngôn ngữ chính
- Rust
- Star
- 1.3k
- Fork
- 668
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 29
Mô tả
### 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!
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.