This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 763
fix(commit_store): fix bug in get_batch_by_transaction
#2458
Open
suchapalaver
wants to merge
3
commits into
hyperledger-archives:1-3
Choose a base branch
from
suchapalaver:fix/fix-bug-in-get-batch-by-transaction
base: 1-3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
fix(commit_store): fix bug in get_batch_by_transaction
#2458
suchapalaver
wants to merge
3
commits into
hyperledger-archives:1-3
from
suchapalaver:fix/fix-bug-in-get-batch-by-transaction
Conversation
This file contains 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
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
September 17, 2023 14:59
7e44a29
to
d615928
Compare
suchapalaver
changed the title
fix 'derivable_impl' clippy warning
fix(commit_store): fix bug in Sep 17, 2023
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
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
vaporos
reviewed
Oct 10, 2023
@@ -322,7 +322,7 @@ impl CommitStore { | |||
!batch | |||
.transaction_ids | |||
.iter() | |||
.any(|txn_id| txn_id == transaction_id) | |||
.all(|txn_id| txn_id != transaction_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it also work to just remove the "!" before "batch"? (If so, it would keep the performance of using any instead of all.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vaporos done.
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
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
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
October 12, 2023 00:13
75f7f06
to
aa66923
Compare
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
October 26, 2023 14:28
aa66923
to
031669a
Compare
Rebase should resolve the jenkins build error (it should be excluded). |
Signed-off-by: Joseph Livesey <[email protected]>
Signed-off-by: Joseph Livesey <[email protected]>
Signed-off-by: Joseph Livesey <[email protected]>
suchapalaver
force-pushed
the
fix/fix-bug-in-get-batch-by-transaction
branch
from
November 20, 2023 22:07
031669a
to
7e3088c
Compare
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_transaction
method, which heretofore returned the first batch that does not contain the providedtransaction_id
argument 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-lib
in this PR.Original work
Signed-off-by: Joseph Livesey [email protected]