Skip to content

Commit 890784a

Browse files
authored
Process withdrawal queue reads concurrently (#372)
1 parent d96cb59 commit 890784a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

crates/tempo-zone/src/withdrawals.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,10 @@ impl WithdrawalProcessor {
286286
/// Process the current head slot of the portal's withdrawal queue on Tempo L1.
287287
#[instrument(skip_all)]
288288
async fn process_queue(&mut self) -> eyre::Result<()> {
289-
let head: alloy_primitives::U256 = self.portal.withdrawalQueueHead().call().await?;
290-
let tail: alloy_primitives::U256 = self.portal.withdrawalQueueTail().call().await?;
289+
let head_call = self.portal.withdrawalQueueHead();
290+
let tail_call = self.portal.withdrawalQueueTail();
291+
let (head, tail): (alloy_primitives::U256, alloy_primitives::U256) =
292+
tokio::try_join!(head_call.call(), tail_call.call())?;
291293

292294
let head_val: u64 = head.try_into().map_err(|_| eyre::eyre!("head overflow"))?;
293295
let tail_val: u64 = tail.try_into().map_err(|_| eyre::eyre!("tail overflow"))?;

0 commit comments

Comments
 (0)