Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Add comment about always taking locks
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Sep 29, 2023
1 parent 47a2a5d commit 47de14e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/banking_stage/unprocessed_transaction_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ fn consume_scan_should_process_packet(
return ProcessingDecision::Never;
}

// Always take locks during batch creation.
// This prevents lower-priority transactions from taking locks
// needed by higher-priority txs that were skipped by this check.
if !payload.account_locks.take_locks(message) {
return ProcessingDecision::Later;
}
Expand Down

0 comments on commit 47de14e

Please sign in to comment.