From da146b6b5691e60e35f70215c7c9059e82ed4ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 17 Dec 2024 18:57:59 -0300 Subject: [PATCH] Remove unnecessary function --- rpc-state-reader/src/execution.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/rpc-state-reader/src/execution.rs b/rpc-state-reader/src/execution.rs index c2db76f..9455cea 100644 --- a/rpc-state-reader/src/execution.rs +++ b/rpc-state-reader/src/execution.rs @@ -3,7 +3,7 @@ use anyhow::Context; use blockifier::{ bouncer::BouncerConfig, context::{BlockContext, ChainInfo, FeeTokenAddresses}, - state::{cached_state::CachedState, state_api::StateReader}, + state::cached_state::CachedState, test_utils::MAX_FEE, transaction::{ account_transaction::ExecutionFlags, objects::TransactionExecutionInfo, @@ -91,7 +91,7 @@ pub fn execute_transaction( .context("block number had no previous")?; let current_reader = RpcStateReader::new(chain, previous_block_number); let mut state = CachedState::new(current_reader); - let execution_info = execute_transaction_with_state(&mut state, &transaction, &context)?; + let execution_info = transaction.execute(&mut state, &context)?; Ok(execution_info) } @@ -123,16 +123,6 @@ pub fn fetch_transaction( Ok((transaction, context)) } -pub fn execute_transaction_with_state( - state: &mut CachedState, - transaction: &BlockiTransaction, - context: &BlockContext, -) -> anyhow::Result { - let execution_info = transaction.execute(state, context)?; - - Ok(execution_info) -} - #[cfg(test)] mod tests { use std::{