Skip to content

Commit 2453df2

Browse files
committed
simpler
1 parent c2b106d commit 2453df2

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

core/src/banking_stage/consumer.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -676,22 +676,21 @@ impl Consumer {
676676
for (key, writable) in
677677
TransactionAccountLocksIterator::new(transaction_info).accounts_with_is_writable()
678678
{
679-
if !has_contention {
680-
let conflicts = if writable {
681-
aggregate_write_locks.contains(key) || aggregate_read_locks.contains(key)
682-
} else {
683-
aggregate_write_locks.contains(key)
684-
};
685-
if conflicts {
686-
has_contention = true;
687-
}
688-
}
689679
if writable {
690680
transaction_write_locks.push(*key);
691681
} else {
692682
transaction_read_locks.push(*key);
693683
}
684+
685+
if !has_contention {
686+
if aggregate_write_locks.contains(key)
687+
|| (writable && aggregate_read_locks.contains(key))
688+
{
689+
has_contention = true;
690+
}
691+
}
694692
}
693+
695694
if has_contention {
696695
result.push(std::mem::take(&mut current_batch));
697696
aggregate_write_locks.clear();

0 commit comments

Comments
 (0)