Skip to content

Commit

Permalink
Delete unused function Bank::remove_builtin() (anza-xyz#1862)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 authored Jun 25, 2024
1 parent 8db8e60 commit 0cc9fe3
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0cc9fe3

Please sign in to comment.