From 0cc9fe36d589fe0dabe5578f77f12c7b5cdca514 Mon Sep 17 00:00:00 2001 From: Pankaj Garg Date: Tue, 25 Jun 2024 09:28:59 -0700 Subject: [PATCH] Delete unused function Bank::remove_builtin() (#1862) --- runtime/src/bank.rs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index e14460f8eed901..7f87dd5466e0c9 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -98,7 +98,7 @@ use { solana_perf::perf_libs, solana_program_runtime::{ invoke_context::BuiltinFunctionWithContext, - loaded_programs::{ProgramCacheEntry, ProgramCacheEntryOwner, ProgramCacheEntryType}, + loaded_programs::ProgramCacheEntry, timings::{ExecuteTimingType, ExecuteTimings}, }, solana_sdk::{ @@ -6254,24 +6254,6 @@ impl Bank { ); } - /// Remove a built-in instruction processor - pub fn remove_builtin(&mut self, program_id: Pubkey, name: &str) { - debug!("Removing program {}", program_id); - // Don't remove the account since the bank expects the account state to - // be idempotent - self.transaction_processor.add_builtin( - self, - program_id, - name, - ProgramCacheEntry::new_tombstone( - self.slot, - ProgramCacheEntryOwner::NativeLoader, - ProgramCacheEntryType::Closed, - ), - ); - debug!("Removed program {}", program_id); - } - pub fn add_precompile(&mut self, program_id: &Pubkey) { debug!("Adding precompiled program {}", program_id); self.add_precompiled_account(program_id);