Fix - Filter condition in `filter_executable_program_accounts()` (#31371)
* Removes `!tx.message().is_writable(i)` from the filter condition in `filter_executable_program_accounts()`. * cargo fmt
This commit is contained in:
parent
e5223e19c7
commit
54f1595dfa
|
@ -651,23 +651,19 @@ impl Accounts {
|
|||
})
|
||||
.is_some()
|
||||
{
|
||||
tx.message()
|
||||
.account_keys()
|
||||
.iter()
|
||||
.enumerate()
|
||||
.for_each(|(i, key)| {
|
||||
if !tx.message().is_writable(i) && !result.contains_key(key) {
|
||||
if let Ok(index) = self.accounts_db.account_matches_owners(
|
||||
ancestors,
|
||||
key,
|
||||
program_owners,
|
||||
) {
|
||||
program_owners
|
||||
.get(index)
|
||||
.and_then(|owner| result.insert(*key, *owner));
|
||||
}
|
||||
tx.message().account_keys().iter().for_each(|key| {
|
||||
if !result.contains_key(key) {
|
||||
if let Ok(index) = self.accounts_db.account_matches_owners(
|
||||
ancestors,
|
||||
key,
|
||||
program_owners,
|
||||
) {
|
||||
program_owners
|
||||
.get(index)
|
||||
.and_then(|owner| result.insert(*key, *owner));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// If the transaction's nonce account was not valid, and blockhash is not found,
|
||||
// the transaction will fail to process. Let's not load any programs from the
|
||||
|
|
Loading…
Reference in New Issue