Skip to content

Commit

Permalink
Removes Bank::remove_builtin().
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed May 9, 2023
1 parent 986b00f commit 4dfe809
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7414,22 +7414,6 @@ impl Bank {
debug!("Added program {} under {:?}", name, program_id);
}

/// Remove a builtin instruction processor if it already exists
pub fn remove_builtin(&mut self, program_id: &Pubkey) {
debug!("Removing program {}", program_id);
// Don't remove the account since the bank expects the account state to
// be idempotent
if let Some(position) = self
.builtin_programs
.vec
.iter()
.position(|entry| entry.0 == *program_id)
{
self.builtin_programs.vec.remove(position);
}
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 4dfe809

Please sign in to comment.