Skip to content

Commit

Permalink
revert account keys length logic
Browse files Browse the repository at this point in the history
  • Loading branch information
2501babe committed Nov 25, 2024
1 parent b54a94e commit d7550c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion runtime/src/account_saver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn collect_accounts_for_successful_tx<'a, T: SVMMessage>(
transaction_ref: Option<&'a SanitizedTransaction>,
transaction_accounts: &'a [TransactionAccount],
) {
for (i, (address, account)) in transaction_accounts.iter().enumerate() {
for (i, (address, account)) in (0..transaction.account_keys().len()).zip(transaction_accounts) {
if !transaction.is_writable(i) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion svm/src/account_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ impl<'a, CB: TransactionProcessingCallback> AccountLoader<'a, CB> {
message: &impl SVMMessage,
transaction_accounts: &[TransactionAccount],
) {
for (i, (address, account)) in transaction_accounts.iter().enumerate() {
for (i, (address, account)) in (0..message.account_keys().len()).zip(transaction_accounts) {
if !message.is_writable(i) {
continue;
}
Expand Down

0 comments on commit d7550c3

Please sign in to comment.