From 63cd7591e2a8c0c142c71918f4e0c97d4822265c Mon Sep 17 00:00:00 2001 From: greged93 <82421016+greged93@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:39:36 +0100 Subject: [PATCH] obs: add transaction hash (#1518) add the transaction hash for failed relaying Signed-off-by: Gregory Edison --- src/pool/mempool.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pool/mempool.rs b/src/pool/mempool.rs index 7dd473cf7..a9c7cc36a 100644 --- a/src/pool/mempool.rs +++ b/src/pool/mempool.rs @@ -83,10 +83,11 @@ impl AccountM let manager = this.clone(); tokio::spawn(async move { // Lock the relayer account + let hash = transaction.hash(); let maybe_relayer = manager.get_relayer().await; if maybe_relayer.is_err() { // If we fail to fetch a relayer, we need to re-insert the transaction in the pool - tracing::error!(target: "account_manager", err = ?maybe_relayer.unwrap_err(), "failed to fetch relayer"); + tracing::error!(target: "account_manager", err = ?maybe_relayer.unwrap_err(), ?hash, "failed to fetch relayer"); let _ = manager .eth_client .mempool() @@ -102,7 +103,7 @@ impl AccountM let res = relayer.relay_transaction(&transaction_signed).await; if res.is_err() { // If the relayer failed to relay the transaction, we need to reposition it in the mempool - tracing::error!(target: "account_manager", err = ?res.unwrap_err(), "failed to relay transaction"); + tracing::error!(target: "account_manager", err = ?res.unwrap_err(), ?hash, "failed to relay transaction"); let _ = manager .eth_client .mempool()