diff --git a/program-runtime/Cargo.toml b/program-runtime/Cargo.toml index 1740ec85cd633f..eaaeb8772f8bae 100644 --- a/program-runtime/Cargo.toml +++ b/program-runtime/Cargo.toml @@ -58,3 +58,5 @@ frozen-abi = [ "solana-sdk/frozen-abi", ] shuttle-test = ["solana-type-overrides/shuttle-test"] +stub-proc-instr = [] + diff --git a/program-runtime/src/invoke_context.rs b/program-runtime/src/invoke_context.rs index 0012422cca3abd..0b420b7701825f 100644 --- a/program-runtime/src/invoke_context.rs +++ b/program-runtime/src/invoke_context.rs @@ -455,10 +455,18 @@ impl<'a> InvokeContext<'a> { timings: &mut ExecuteTimings, ) -> Result<(), InstructionError> { *compute_units_consumed = 0; + + // Stub out the processing of the instruction + if cfg!(feature = "stub-proc-instr"){ + eprintln!("Stubbing out processing of instruction"); + return Ok(()); + } + self.transaction_context .get_next_instruction_context()? .configure(program_indices, instruction_accounts, instruction_data); self.push()?; + self.process_executable_chain(compute_units_consumed, timings) // MUST pop if and only if `push` succeeded, independent of `result`. // Thus, the `.and()` instead of an `.and_then()`.