Skip to content

Commit

Permalink
fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
2501babe committed Aug 23, 2024
1 parent f0a7120 commit 7313b0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions svm/src/account_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {
nonce_info::NonceInfo,
rollback_accounts::RollbackAccounts,
transaction_error_metrics::TransactionErrorMetrics,
transaction_processing_callback::{AccountState, TransactionProcessingCallback},
transaction_processing_callback::{/* XXX AccountState, */ TransactionProcessingCallback,},
},
itertools::Itertools,
solana_compute_budget::compute_budget_limits::ComputeBudgetLimits,
Expand Down Expand Up @@ -472,7 +472,7 @@ fn load_transaction_account(
loaded_programs: &ProgramCacheForTxBatch,
) -> Result<(LoadedTransactionAccount, bool)> {
let mut account_found = true;
let mut was_inspected = false;
let mut _was_inspected = false;
let is_instruction_account = u8::try_from(account_index)
.map(|i| instruction_accounts.contains(&&i))
.unwrap_or(false);
Expand Down Expand Up @@ -507,13 +507,15 @@ fn load_transaction_account(
let rent_collected = if is_writable {
// Inspect the account prior to collecting rent, since
// rent collection can modify the account.
/* XXX HANA i messaged brooks asking what this is... newly added yesterday 8/22
debug_assert!(!was_inspected);
callbacks.inspect_account(
account_key,
AccountState::Alive(&account),
is_writable,
);
was_inspected = true;
*/

collect_rent_from_account(
feature_set,
Expand Down Expand Up @@ -547,6 +549,7 @@ fn load_transaction_account(
})
};

/* XXX as noted above
if !was_inspected {
let account_state = if account_found {
AccountState::Alive(&loaded_account.account)
Expand All @@ -555,6 +558,7 @@ fn load_transaction_account(
};
callbacks.inspect_account(account_key, account_state, is_writable);
}
*/

Ok((loaded_account, account_found))
}
Expand Down
4 changes: 2 additions & 2 deletions svm/src/transaction_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ impl<FG: ForkGraph> TransactionBatchProcessor<FG> {
} else {
Err(fees_only_tx.load_error)
}
},
}
TransactionLoadResult::Loaded(loaded_transaction) => {
let executed_tx = self.execute_loaded_transaction(
tx,
Expand All @@ -337,7 +337,7 @@ impl<FG: ForkGraph> TransactionBatchProcessor<FG> {
program_cache_for_tx_batch.merge(&executed_tx.programs_modified_by_tx);
}

Ok(executed_tx)
Ok(ProcessedTransaction::Executed(Box::new(executed_tx)))
}
};

Expand Down

0 comments on commit 7313b0f

Please sign in to comment.