This reverts commit 401c542d2a
.
This commit is contained in:
@ -1,13 +1,9 @@
|
||||
use {
|
||||
crate::cost_model::ExecutionCost,
|
||||
serde::{Deserialize, Serialize},
|
||||
solana_measure::measure::Measure,
|
||||
solana_program_runtime::{
|
||||
instruction_recorder::InstructionRecorder,
|
||||
invoke_context::{
|
||||
BuiltinProgram, Executors, InvokeContext, ProcessInstructionResult,
|
||||
TransactionAccountRefCell,
|
||||
},
|
||||
invoke_context::{BuiltinProgram, Executors, InvokeContext, TransactionAccountRefCell},
|
||||
log_collector::LogCollector,
|
||||
timings::ExecuteDetailsTimings,
|
||||
},
|
||||
@ -49,7 +45,6 @@ impl MessageProcessor {
|
||||
builtin_programs: &[BuiltinProgram],
|
||||
message: &Message,
|
||||
program_indices: &[Vec<usize>],
|
||||
estimated_execution_cost: ExecutionCost,
|
||||
accounts: &[TransactionAccountRefCell],
|
||||
rent: Rent,
|
||||
log_collector: Option<Rc<RefCell<LogCollector>>>,
|
||||
@ -110,21 +105,16 @@ impl MessageProcessor {
|
||||
Some(&instruction_recorders[instruction_index]);
|
||||
}
|
||||
let mut time = Measure::start("execute_instruction");
|
||||
let ProcessInstructionResult {
|
||||
compute_units_consumed,
|
||||
result,
|
||||
} = invoke_context.process_instruction(message, instruction, program_indices, &[], &[]);
|
||||
let compute_meter_consumption = invoke_context
|
||||
.process_instruction(message, instruction, program_indices, &[], &[])
|
||||
.map_err(|err| TransactionError::InstructionError(instruction_index as u8, err))?;
|
||||
time.stop();
|
||||
timings.accumulate_program(
|
||||
instruction.program_id(&message.account_keys),
|
||||
time.as_us(),
|
||||
compute_units_consumed,
|
||||
estimated_execution_cost,
|
||||
result.is_err(),
|
||||
compute_meter_consumption,
|
||||
);
|
||||
timings.accumulate(&invoke_context.timings);
|
||||
result
|
||||
.map_err(|err| TransactionError::InstructionError(instruction_index as u8, err))?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@ -240,7 +230,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&program_indices,
|
||||
0,
|
||||
&accounts,
|
||||
rent_collector.rent,
|
||||
None,
|
||||
@ -270,7 +259,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&program_indices,
|
||||
0,
|
||||
&accounts,
|
||||
rent_collector.rent,
|
||||
None,
|
||||
@ -304,7 +292,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&program_indices,
|
||||
0,
|
||||
&accounts,
|
||||
rent_collector.rent,
|
||||
None,
|
||||
@ -449,7 +436,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&program_indices,
|
||||
0,
|
||||
&accounts,
|
||||
rent_collector.rent,
|
||||
None,
|
||||
@ -483,7 +469,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&program_indices,
|
||||
0,
|
||||
&accounts,
|
||||
rent_collector.rent,
|
||||
None,
|
||||
@ -514,7 +499,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&program_indices,
|
||||
0,
|
||||
&accounts,
|
||||
rent_collector.rent,
|
||||
None,
|
||||
@ -572,7 +556,6 @@ mod tests {
|
||||
builtin_programs,
|
||||
&message,
|
||||
&[vec![0], vec![1]],
|
||||
0,
|
||||
&accounts,
|
||||
RentCollector::default().rent,
|
||||
None,
|
||||
|
Reference in New Issue
Block a user