From 68c673b1ed40f6fc5ba2898f24c60bca6738bcc1 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 10 Feb 2024 15:03:19 +0100 Subject: [PATCH] chore: add warn logs for fork delegations (#7073) --- crates/anvil/src/eth/backend/mem/mod.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/anvil/src/eth/backend/mem/mod.rs b/crates/anvil/src/eth/backend/mem/mod.rs index da599966bc06..05a2ae8511a1 100644 --- a/crates/anvil/src/eth/backend/mem/mod.rs +++ b/crates/anvil/src/eth/backend/mem/mod.rs @@ -1892,10 +1892,10 @@ impl Backend { } if let Some(fork) = self.get_fork() { - return fork - .debug_trace_transaction(hash, opts) - .await - .map_err(|_| BlockchainError::DataUnavailable) + return fork.debug_trace_transaction(hash, opts).await.map_err(|err| { + warn!(target: "backend", "error delegating debug_traceTransaction: {:?}", err); + BlockchainError::DataUnavailable + }) } Ok(GethTrace::Default(Default::default())) @@ -1921,7 +1921,10 @@ impl Backend { if let Some(fork) = self.get_fork() { if fork.predates_fork(number) { - return fork.trace_block(number).await.map_err(|_| BlockchainError::DataUnavailable) + return fork.trace_block(number).await.map_err(|err| { + warn!(target: "backend", "error delegating trace_block: {:?}", err); + BlockchainError::DataUnavailable + }) } }