diff --git a/crates/optimism/rpc/src/eth/transaction.rs b/crates/optimism/rpc/src/eth/transaction.rs index aa7e8ea60bd..37c05815a61 100644 --- a/crates/optimism/rpc/src/eth/transaction.rs +++ b/crates/optimism/rpc/src/eth/transaction.rs @@ -95,8 +95,8 @@ where let this = self.clone(); let timeout_duration = self.send_raw_transaction_sync_timeout(); async move { - let hash = EthTransactions::send_raw_transaction(&this, tx).await?; let mut canonical_stream = this.provider().canonical_state_stream(); + let hash = EthTransactions::send_raw_transaction(&this, tx).await?; let flashblock_rx = this.pending_block_rx(); let mut flashblock_stream = flashblock_rx.map(WatchStream::new); diff --git a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs index 81909b3f36e..2cbf1aff14e 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs @@ -91,8 +91,8 @@ pub trait EthTransactions: LoadTransaction { let this = self.clone(); let timeout_duration = self.send_raw_transaction_sync_timeout(); async move { - let hash = EthTransactions::send_raw_transaction(&this, tx).await?; let mut stream = this.provider().canonical_state_stream(); + let hash = EthTransactions::send_raw_transaction(&this, tx).await?; tokio::time::timeout(timeout_duration, async { while let Some(notification) = stream.next().await { let chain = notification.committed();