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()
|
.is_some()
|
||||||
{
|
{
|
||||||
tx.message()
|
tx.message().account_keys().iter().for_each(|key| {
|
||||||
.account_keys()
|
if !result.contains_key(key) {
|
||||||
.iter()
|
if let Ok(index) = self.accounts_db.account_matches_owners(
|
||||||
.enumerate()
|
ancestors,
|
||||||
.for_each(|(i, key)| {
|
key,
|
||||||
if !tx.message().is_writable(i) && !result.contains_key(key) {
|
program_owners,
|
||||||
if let Ok(index) = self.accounts_db.account_matches_owners(
|
) {
|
||||||
ancestors,
|
program_owners
|
||||||
key,
|
.get(index)
|
||||||
program_owners,
|
.and_then(|owner| result.insert(*key, *owner));
|
||||||
) {
|
|
||||||
program_owners
|
|
||||||
.get(index)
|
|
||||||
.and_then(|owner| result.insert(*key, *owner));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// If the transaction's nonce account was not valid, and blockhash is not found,
|
// 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
|
// the transaction will fail to process. Let's not load any programs from the
|
||||||
|
|
Loading…
Reference in New Issue