Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svm: allow conflicting transactions in entries #3453

Merged
merged 6 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
improve writable lookup in integration tests
  • Loading branch information
2501babe committed Nov 15, 2024
commit 755375d2666069c616d53c7e2283297cb66855e6
20 changes: 8 additions & 12 deletions svm/tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -157,21 +157,17 @@ impl SvmTestEnvironment<'_> {

match processed_transaction {
Ok(ProcessedTransaction::Executed(executed_transaction)) => {
for (pubkey, account_data) in
executed_transaction.loaded_transaction.accounts.clone()
for (index, (pubkey, account_data)) in executed_transaction
.loaded_transaction
.accounts
.iter()
.enumerate()
{
let is_writable = sanitized_transaction
.account_keys()
.iter()
.position(|key| key == &pubkey)
.map(|index| sanitized_transaction.is_writable(index))
.unwrap_or(false);

if is_writable {
if sanitized_transaction.is_writable(index) {
update_or_dealloc_account(
&mut final_accounts_actual,
pubkey,
account_data,
*pubkey,
account_data.clone(),
);
}
}
Loading