Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor - Merges BuiltinPrograms into LoadedPrograms #31654

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions ledger-tool/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,7 @@ pub fn program(ledger_path: &Path, matches: &ArgMatches<'_>) {
AccountSharedData::new(0, 0, &loader_id),
));
let interpreted = matches.value_of("mode").unwrap() != "jit";
with_mock_invoke_context!(
invoke_context,
transaction_context,
transaction_accounts,
bank.get_builtin_programs()
);
with_mock_invoke_context!(invoke_context, transaction_context, transaction_accounts);

// Adding `DELAY_VISIBILITY_SLOT_OFFSET` to slots to accommodate for delay visibility of the program
let mut loaded_programs =
Expand Down
12 changes: 3 additions & 9 deletions ledger/src/blockstore_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ pub mod tests {
matches::assert_matches,
rand::{thread_rng, Rng},
solana_entry::entry::{create_ticks, next_entry, next_entry_mut},
solana_program_runtime::{builtin_program::create_builtin, declare_process_instruction},
solana_program_runtime::declare_process_instruction,
solana_runtime::{
genesis_utils::{
self, create_genesis_config_with_vote_accounts, ValidatorVoteKeypairs,
Expand Down Expand Up @@ -3002,10 +3002,7 @@ pub mod tests {
let mock_program_id = solana_sdk::pubkey::new_rand();

let mut bank = Bank::new_for_tests(&genesis_config);
bank.add_builtin(
mock_program_id,
create_builtin("mockup".to_string(), mock_processor_ok),
);
bank.add_mockup_builtin(mock_program_id, mock_processor_ok);

let tx = Transaction::new_signed_with_payer(
&[Instruction::new_with_bincode(
Expand Down Expand Up @@ -3046,10 +3043,7 @@ pub mod tests {

(0..get_instruction_errors().len()).for_each(|err| {
let mut bank = Bank::new_for_tests(&genesis_config);
bank.add_builtin(
mock_program_id,
create_builtin("mockup".to_string(), mock_processor_err),
);
bank.add_mockup_builtin(mock_program_id, mock_processor_err);

let tx = Transaction::new_signed_with_payer(
&[Instruction::new_with_bincode(
Expand Down
47 changes: 0 additions & 47 deletions program-runtime/src/builtin_program.rs

This file was deleted.

Loading