Skip to content

Commit fde2924

Browse files
committed
address comment
1 parent 72647df commit fde2924

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

crates/scroll/rpc/src/eth/transaction.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,25 @@ where
4949
if self.inner.propagate_local_transactions {
5050
// Forward to remote sequencer RPC asynchronously (fire and forget)
5151
let client = client.clone();
52-
let tx_clone = tx.clone();
53-
let hash_clone = hash;
52+
let tx = tx.clone();
5453
tokio::spawn(async move {
55-
match client.forward_raw_transaction(&tx_clone).await {
54+
match client.forward_raw_transaction(&tx).await {
5655
Ok(sequencer_hash) => {
57-
tracing::debug!(target: "scroll::rpc::eth", local_hash=%hash_clone, sequencer_hash=%sequencer_hash, "successfully forwarded transaction to sequencer");
56+
tracing::debug!(target: "scroll::rpc::eth", local_hash=%hash, %sequencer_hash, "successfully forwarded transaction to sequencer");
5857
}
5958
Err(err) => {
60-
tracing::warn!(target: "scroll::rpc::eth", %err, %hash_clone, "failed to forward transaction to sequencer, but transaction is in local pool and will be propagated");
59+
tracing::warn!(target: "scroll::rpc::eth", %err, local_hash=%hash, "failed to forward transaction to sequencer, but transaction is in local pool and will be propagated");
6160
}
6261
}
6362
});
6463
} else {
6564
// Forward to remote sequencer RPC synchronously
6665
match client.forward_raw_transaction(&tx).await {
6766
Ok(sequencer_hash) => {
68-
tracing::debug!(target: "scroll::rpc::eth", local_hash=%hash, sequencer_hash=%sequencer_hash, "successfully forwarded transaction to sequencer");
67+
tracing::debug!(target: "scroll::rpc::eth", local_hash=%hash, %sequencer_hash, "successfully forwarded transaction to sequencer");
6968
}
7069
Err(err) => {
71-
tracing::warn!(target: "scroll::rpc::eth", %err, %hash, "failed to forward transaction to sequencer");
70+
tracing::warn!(target: "scroll::rpc::eth", %err, local_hash=%hash, "failed to forward transaction to sequencer");
7271
return Err(ScrollEthApiError::Sequencer(err));
7372
}
7473
}

0 commit comments

Comments
 (0)