From 29d77047acf6c59a781db53d9952734172ae54e8 Mon Sep 17 00:00:00 2001 From: buffalu <85544055+buffalu@users.noreply.github.com> Date: Wed, 13 Sep 2023 01:28:46 -0500 Subject: [PATCH] Remove blacklisted tx from message_hash_to_transaction (Backport #374) (#376) --- core/src/unprocessed_transaction_storage.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/unprocessed_transaction_storage.rs b/core/src/unprocessed_transaction_storage.rs index becd0be685..468adc3160 100644 --- a/core/src/unprocessed_transaction_storage.rs +++ b/core/src/unprocessed_transaction_storage.rs @@ -190,17 +190,15 @@ fn consume_scan_should_process_packet( bank.get_transaction_account_lock_limit(), ) .is_err() + || message + .account_keys() + .iter() + .any(|key| blacklisted_accounts.contains(key)) { payload .message_hash_to_transaction .remove(packet.message_hash()); ProcessingDecision::Never - } else if message - .account_keys() - .iter() - .any(|key| blacklisted_accounts.contains(key)) - { - ProcessingDecision::Never } else if payload.account_locks.try_locking(message) { payload.sanitized_transactions.push(sanitized_transaction); ProcessingDecision::Now