From d232b4be2a81c4507650c16cc5096eb41884dd25 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 8 Aug 2024 17:21:06 +0200 Subject: [PATCH] fix: properly modify spec id for evm --- crates/evm/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/evm/src/lib.rs b/crates/evm/src/lib.rs index 3c47b71a1b75..85065ec1e323 100644 --- a/crates/evm/src/lib.rs +++ b/crates/evm/src/lib.rs @@ -77,9 +77,10 @@ pub trait ConfigureEvm: ConfigureEvmEnv { DB: Database, I: GetInspector, { - RethEvmBuilder::new(db, self.default_external_context()) - .with_env(env.into()) - .build_with_inspector(inspector) + let mut evm = self.evm_with_inspector(db, inspector); + evm.modify_spec_id(env.spec_id()); + evm.context.evm.env = env.env; + evm } /// Returns a new EVM with the given inspector.