This repository was archived by the owner on Feb 1, 2024. It is now read-only.
fix(commit_store): fix bug in get_batch_by_transaction#2458
Open
suchapalaver wants to merge 3 commits into
Open
fix(commit_store): fix bug in get_batch_by_transaction#2458suchapalaver wants to merge 3 commits into
get_batch_by_transaction#2458suchapalaver wants to merge 3 commits into
Conversation
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
September 17, 2023 14:59
7e44a29 to
d615928
Compare
get_batch_by_transaction
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
September 17, 2023 15:03
d615928 to
08b26b7
Compare
suchapalaver
marked this pull request as ready for review
September 17, 2023 15:03
suchapalaver
requested review from
agunde406,
cianx,
dcmiddle,
jsmitchell,
peterschwarz,
rberg2,
rbuysse and
vaporos
as code owners
September 17, 2023 15:03
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
4 times, most recently
from
September 22, 2023 15:42
3a1f377 to
6b5ac34
Compare
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
October 1, 2023 19:30
6b5ac34 to
4298afa
Compare
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
2 times, most recently
from
October 9, 2023 22:20
b9739d9 to
b18178f
Compare
suchapalaver
marked this pull request as draft
October 9, 2023 22:28
vaporos
reviewed
Oct 10, 2023
| .transaction_ids | ||
| .iter() | ||
| .any(|txn_id| txn_id == transaction_id) | ||
| .all(|txn_id| txn_id != transaction_id) |
Contributor
There was a problem hiding this comment.
Would it also work to just remove the "!" before "batch"? (If so, it would keep the performance of using any instead of all.)
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
2 times, most recently
from
October 10, 2023 15:08
57495e5 to
47a8975
Compare
suchapalaver
marked this pull request as ready for review
October 10, 2023 15:09
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
4 times, most recently
from
October 10, 2023 15:52
2462780 to
75f7f06
Compare
suchapalaver
marked this pull request as draft
October 10, 2023 17:18
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
October 12, 2023 00:13
75f7f06 to
aa66923
Compare
suchapalaver
marked this pull request as ready for review
October 12, 2023 00:14
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
October 26, 2023 14:28
aa66923 to
031669a
Compare
Contributor
|
Rebase should resolve the jenkins build error (it should be excluded). |
Signed-off-by: Joseph Livesey <jlivesey@gmail.com>
Signed-off-by: Joseph Livesey <jlivesey@gmail.com>
Signed-off-by: Joseph Livesey <jlivesey@gmail.com>
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
November 20, 2023 22:07
031669a to
7e3088c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in the
sawtooth_validator::journal::commit_store::CommitStore'sget_batch_by_transactionmethod, which heretofore returned the first batch that does not contain the providedtransaction_idargument without any error.The equivalent Python method calls the Rust method via FFI:
Here's
commit_store_get_batch_by_transaction, which is called in the snippet above and callsget_batch_by_transaction:Concomitant changes were merged into
sawtooth-libin this PR.Original work
Signed-off-by: Joseph Livesey jlivesey@gmail.com