Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit c4e6bcb

Browse files
committed
Fix bug in commit_store get_batch_by_transaction
Signed-off-by: Joseph Livesey <jlivesey@gmail.com>
1 parent 9fb49d2 commit c4e6bcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

validator/src/journal/commit_store.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl CommitStore {
319319
.batches
320320
.into_iter()
321321
.find(|batch| {
322-
!batch
322+
batch
323323
.transaction_ids
324324
.iter()
325325
.any(|txn_id| txn_id == transaction_id)
@@ -605,7 +605,7 @@ mod tests {
605605
!batch
606606
.transaction_ids
607607
.iter()
608-
.any(|txn_id| txn_id == transaction_id)
608+
.all(|txn_id| txn_id != transaction_id)
609609
})
610610
.ok_or_else(|| DatabaseError::CorruptionError("Transaction index corrupted".into()))
611611
// })

0 commit comments

Comments
 (0)