Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
fix(commit_store): fix bug in get_batch_by_transaction
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Livesey <[email protected]>
  • Loading branch information
suchapalaver committed Mar 3, 2023
1 parent 46f0faf commit 0fa9094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions validator/src/journal/commit_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl CommitStore {
batch
.transaction_ids
.iter()
.any(|txn_id| txn_id == transaction_id)
.all(|txn_id| txn_id != transaction_id)
})
.next()
.ok_or_else(|| {
Expand Down Expand Up @@ -620,7 +620,7 @@ mod tests {
batch
.transaction_ids
.iter()
.any(|txn_id| txn_id == transaction_id)
.all(|txn_id| txn_id != transaction_id)
})
.next()
.ok_or_else(|| DatabaseError::CorruptionError("Transaction index corrupted".into()))
Expand Down

0 comments on commit 0fa9094

Please sign in to comment.