From 836d08a77d64d9ed1f33130a7d11adce89adc38e Mon Sep 17 00:00:00 2001 From: renancloudwalk <53792026+renancloudwalk@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:28:54 -0300 Subject: [PATCH] chore: just put the error plainly on the return (#302) * chore: just put the error plainly on the return * lint * chore: move log back into error --- src/eth/evm/revm.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/eth/evm/revm.rs b/src/eth/evm/revm.rs index c6c27b5bf..df6db2856 100644 --- a/src/eth/evm/revm.rs +++ b/src/eth/evm/revm.rs @@ -9,6 +9,7 @@ use std::sync::Arc; use std::time::Instant; use anyhow::anyhow; +use anyhow::Context; use itertools::Itertools; use revm::primitives::AccountInfo; use revm::primitives::Address as RevmAddress; @@ -108,7 +109,7 @@ impl Evm for Revm { Ok(result) => Ok(parse_revm_execution(result, session.input, session.storage_changes)), Err(e) => { tracing::warn!(reason = ?e, "evm execution error"); - Err(anyhow!("Error executing EVM transaction. Check logs for more information.")) + Err(e).context("Error executing EVM transaction.") } };