Skip to content

Commit

Permalink
Reword comment in load_transaction_accounts() (solana-labs#34561)
Browse files Browse the repository at this point in the history
Rewords the comment of simplify_writable_program_account_check in load_transaction_accounts().
  • Loading branch information
Lichtso authored Dec 21, 2023
1 parent 1db76cf commit 14446e5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions runtime/src/accounts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,8 @@ fn load_transaction_accounts(
.then_some(())
.and_then(|_| loaded_programs.find(key))
{
// This condition block does special handling for accounts that are passed
// as instruction account to any of the instructions in the transaction.
// It's been noticed that some programs are reading other program accounts
// (that are passed to the program as instruction accounts). So such accounts
// are needed to be loaded even though corresponding compiled program may
// already be present in the cache.
// Optimization to skip loading of accounts which are only used as
// programs in top-level instructions and not passed as instruction accounts.
account_shared_data_from_program(key, program_accounts)
.map(|program_account| (program.account_size, program_account, 0))?
} else {
Expand Down

0 comments on commit 14446e5

Please sign in to comment.