Skip to content

Commit

Permalink
use loader-instruction crate in transaction-status
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Jan 16, 2025
1 parent adaae45 commit f35686a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 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 programs/sbf/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 svm/examples/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 transaction-status/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ solana-account-decoder = { workspace = true }
solana-clock = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-loader-instruction = { workspace = true, features = ["bincode"] }
solana-message = { workspace = true }
solana-program = { workspace = true }
solana-pubkey = { workspace = true }
Expand Down
17 changes: 5 additions & 12 deletions transaction-status/src/parse_bpf_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ use {
base64::{prelude::BASE64_STANDARD, Engine},
bincode::deserialize,
serde_json::json,
solana_loader_instruction::LoaderInstruction,
solana_message::{compiled_instruction::CompiledInstruction, AccountKeys},
solana_program::{
loader_instruction::LoaderInstruction,
loader_upgradeable_instruction::UpgradeableLoaderInstruction,
},
solana_program::loader_upgradeable_instruction::UpgradeableLoaderInstruction,
};

pub fn parse_bpf_loader(
Expand Down Expand Up @@ -224,12 +222,8 @@ mod test {
let account_keys = vec![fee_payer, account_pubkey];
let missing_account_keys = vec![account_pubkey];

let instruction = solana_program::loader_instruction::write(
&account_pubkey,
&program_id,
offset,
bytes.clone(),
);
let instruction =
solana_loader_instruction::write(&account_pubkey, &program_id, offset, bytes.clone());
let mut message = Message::new(&[instruction], Some(&fee_payer));
assert_eq!(
parse_bpf_loader(
Expand Down Expand Up @@ -258,8 +252,7 @@ mod test {
)
.is_err());

let instruction =
solana_program::loader_instruction::finalize(&account_pubkey, &program_id);
let instruction = solana_loader_instruction::finalize(&account_pubkey, &program_id);
let mut message = Message::new(&[instruction], Some(&fee_payer));
assert_eq!(
parse_bpf_loader(
Expand Down

0 comments on commit f35686a

Please sign in to comment.