Skip to content

Commit fd77864

Browse files
authored
100s timeout for getting bridge tx receipt (#562)
* 100s timeout for getting bridge tx receipt * 0.2.117
1 parent 70dffa2 commit fd77864

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resolver = "2"
1010
default-members = ["node"]
1111

1212
[workspace.package]
13-
version = "0.2.116"
13+
version = "0.2.117"
1414
edition = "2024"
1515
repository = "https://github.com/NethermindEth/Catalyst"
1616
license = "MIT"

node/src/taiko/l2_execution_layer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use alloy::{
2020
use alloy_json_rpc::RpcError;
2121
use anyhow::Error;
2222
use serde_json::Value;
23+
use std::time::Duration;
2324
use tokio::sync::RwLock;
2425
use tracing::{debug, info, warn};
2526

@@ -387,7 +388,11 @@ impl L2ExecutionLayer {
387388
let tx_hash = *pending_tx.tx_hash();
388389
info!("Bridge sendMessage tx hash: {}", tx_hash);
389390

390-
let receipt = pending_tx.get_receipt().await?;
391+
const RECEIPT_TIMEOUT: Duration = Duration::from_secs(100);
392+
let receipt = pending_tx
393+
.with_timeout(Some(RECEIPT_TIMEOUT))
394+
.get_receipt()
395+
.await?;
391396

392397
if receipt.status() {
393398
let block_number = if let Some(block_number) = receipt.block_number() {

0 commit comments

Comments
 (0)