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

v1.16: Backport #449 #450

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
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
7 changes: 6 additions & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3696,7 +3696,12 @@ impl Bank {
let mut account_locks = AccountLocks::default();
let lock_results =
Accounts::lock_accounts_sequential(&mut account_locks, tx_account_locks_results);
TransactionBatch::new(lock_results, self, Cow::Borrowed(transactions))
let mut batch = TransactionBatch::new(lock_results, self, Cow::Borrowed(transactions));
// this is required to ensure that accounts aren't unlocked accidentally, which can be problematic during replay.
// more specifically, during process_entries, if the lock counts are accidentally decremented,
// one might end up replaying a block incorrectly
batch.set_needs_unlock(false);
batch
}

/// Prepare a transaction batch without locking accounts for transaction simulation.
Expand Down