From 522b1494b97d7cfb8ba5182ba7a1a05f207d2ac5 Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Fri, 16 Feb 2024 16:11:42 -0500 Subject: [PATCH] re-add op method calls --- crates/payload/optimism/src/lib.rs | 13 +++---------- crates/primitives/src/revm/env.rs | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/crates/payload/optimism/src/lib.rs b/crates/payload/optimism/src/lib.rs index 94000cdfe1..e19102c1aa 100644 --- a/crates/payload/optimism/src/lib.rs +++ b/crates/payload/optimism/src/lib.rs @@ -22,13 +22,12 @@ mod builder { use reth_primitives::{ constants::{BEACON_NONCE, EMPTY_RECEIPTS, EMPTY_TRANSACTIONS}, proofs, - revm::{compat::into_reth_log, env::FillableTransaction}, + revm::env::FillableTransaction, Block, Hardfork, Header, IntoRecoveredTransaction, Receipt, Receipts, TxType, EMPTY_OMMER_ROOT_HASH, U256, }; use reth_provider::{BundleStateWithReceipts, StateProviderFactory}; use reth_revm::database::StateProviderDatabase; - use reth_rpc::eth::revm_utils::FillableTransaction; use reth_transaction_pool::{BestTransactionsAttributes, TransactionPool}; use revm::{ db::states::bundle_state::BundleRetention, @@ -307,7 +306,7 @@ mod builder { .with_env_with_handler_cfg(EnvWithHandlerCfg::new_with_cfg_env( initialized_cfg.clone(), initialized_block_env.clone(), - sequencer_tx.new_filled_tx_env(), + sequencer_tx.tx_env(), )) .build(); @@ -379,18 +378,12 @@ mod builder { let tx = pool_tx.to_recovered_transaction(); // Configure the environment for the block. - let env = Env { - cfg: initialized_cfg.clone(), - block: initialized_block_env.clone(), - tx: tx.new_filled_tx_env(), - }; - let mut evm = revm::Evm::builder() .with_db(&mut db) .with_env_with_handler_cfg(EnvWithHandlerCfg::new_with_cfg_env( initialized_cfg.clone(), initialized_block_env.clone(), - tx_env_with_recovered(&tx), + tx.tx_env(), )) .build(); diff --git a/crates/primitives/src/revm/env.rs b/crates/primitives/src/revm/env.rs index 570d15460f..1f60af620f 100644 --- a/crates/primitives/src/revm/env.rs +++ b/crates/primitives/src/revm/env.rs @@ -395,7 +395,7 @@ impl TryFillableTransaction for TransactionSigned { { let mut envelope_buf = Vec::with_capacity(self.length_without_header()); self.encode_enveloped(&mut envelope_buf); - fill_tx_env(tx_env, self, signer, envelope_buf.into()); + fill_op_tx_env(tx_env, self, signer, envelope_buf.into()); } Ok(()) }