Skip to content

Commit

Permalink
Use Solana builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
Aursen committed Feb 23, 2025
1 parent d9717de commit 740f5e2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 90 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ solana-account = "2.2"
solana-address-lookup-table-interface = "2.2"
solana-address-lookup-table-program = "2.2"
solana-bpf-loader-program = "2.2"
solana-builtins = "2.2"
solana-clock = "2.2"
solana-compute-budget = "2.2"
solana-compute-budget-instruction = "2.2"
Expand Down
1 change: 1 addition & 0 deletions crates/litesvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ solana-account.workspace = true
solana-address-lookup-table-interface.workspace = true
solana-address-lookup-table-program.workspace = true
solana-bpf-loader-program.workspace = true
solana-builtins.workspace = true
solana-clock.workspace = true
solana-compute-budget.workspace = true
solana-compute-budget-instruction.workspace = true
Expand Down
87 changes: 0 additions & 87 deletions crates/litesvm/src/builtin.rs

This file was deleted.

5 changes: 2 additions & 3 deletions crates/litesvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ use precompiles::load_precompiles;
use qualifier_attr::qualifiers;
use solana_bpf_loader_program::syscalls::create_program_runtime_environment_v1;
use solana_bpf_loader_program::syscalls::create_program_runtime_environment_v2;
use solana_builtins::BUILTINS;
use solana_compute_budget::compute_budget::ComputeBudget;
use solana_compute_budget::compute_budget_limits::ComputeBudgetLimits;
use solana_compute_budget_instruction::instructions_processor::process_compute_budget_instructions;
Expand Down Expand Up @@ -317,7 +318,6 @@ use {

use crate::{
accounts_db::AccountsDb,
builtin::BUILTINS,
error::LiteSVMError,
history::TransactionHistory,
message_processor::process_message,
Expand All @@ -330,7 +330,6 @@ pub mod error;
pub mod types;

mod accounts_db;
mod builtin;
mod format_logs;
mod history;
mod message_processor;
Expand Down Expand Up @@ -462,7 +461,7 @@ impl LiteSVM {
fn set_builtins(&mut self) {
BUILTINS.iter().for_each(|builtint| {
if builtint
.feature_id
.enable_feature_id
.map_or(true, |x| self.feature_set.is_active(&x))
{
let loaded_program =
Expand Down

0 comments on commit 740f5e2

Please sign in to comment.