From a8117ee97586942f54ad2dd3cb6d2a3776ffcb71 Mon Sep 17 00:00:00 2001 From: greged93 <82421016+greged93@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:12:42 +0200 Subject: [PATCH] obs: send_raw_transaction (#1480) add observability in send_raw_transaction Signed-off-by: Gregory Edison --- src/client/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index 0117aab9a..e07cbefdb 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -104,6 +104,9 @@ where // Recover the signer from the transaction let signer = transaction_signed.recover_signer().ok_or(SignatureError::Recovery)?; + let hash = transaction_signed.hash(); + let to = transaction_signed.to(); + let transaction_signed_ec_recovered = TransactionSignedEcRecovered::from_signed_transaction(transaction_signed.clone(), signer); @@ -116,7 +119,11 @@ where self.eth_provider.deploy_evm_transaction_signer(signer).await?; // Add the transaction to the pool and wait for it to be picked up by a relayer - let hash = self.pool.add_transaction(TransactionOrigin::Local, pool_transaction).await?; + let hash = self + .pool + .add_transaction(TransactionOrigin::Local, pool_transaction) + .await + .inspect_err(|err| tracing::error!(?err, ?hash, ?to, from = ?signer))?; Ok(hash) }