Skip to content

Commit

Permalink
generic load_accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Aug 1, 2024
1 parent 1b509e6 commit 7d33ed7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions svm/src/account_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use {
self,
instructions::{construct_instructions_data, BorrowedAccountMeta, BorrowedInstruction},
},
transaction::{Result, SanitizedTransaction, TransactionError},
transaction::{Result, TransactionError},
transaction_context::{IndexOfAccount, TransactionAccount},
},
solana_svm_transaction::svm_message::SVMMessage,
Expand Down Expand Up @@ -158,7 +158,7 @@ pub fn validate_fee_payer(
/// second element.
pub(crate) fn load_accounts<CB: TransactionProcessingCallback>(
callbacks: &CB,
txs: &[SanitizedTransaction],
txs: &[impl SVMMessage],
validation_results: Vec<TransactionValidationResult>,
error_metrics: &mut TransactionErrorMetrics,
account_overrides: Option<&AccountOverrides>,
Expand All @@ -170,12 +170,10 @@ pub(crate) fn load_accounts<CB: TransactionProcessingCallback>(
.zip(validation_results)
.map(|etx| match etx {
(tx, Ok(tx_details)) => {
let message = tx.message();

// load transactions
load_transaction_accounts(
callbacks,
message,
tx,
tx_details,
error_metrics,
account_overrides,
Expand Down

0 comments on commit 7d33ed7

Please sign in to comment.