-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix overriding tx index of duplicated txs #498
Merged
Merged
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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
==========================================
+ Coverage 65.44% 65.48% +0.04%
==========================================
Files 278 278
Lines 37936 37966 +30
==========================================
+ Hits 24828 24863 +35
+ Misses 11305 11297 -8
- Partials 1803 1806 +3
|
tnasu
reviewed
Nov 14, 2022
ulbqb
changed the title
Fix overriding tx index of duplicated txs
fix: fix overriding tx index of duplicated txs
Nov 14, 2022
This reverts commit e02f6b8.
tnasu
approved these changes
Nov 14, 2022
Mdaiki0730
approved these changes
Nov 15, 2022
What's the reason to incorporate only this tendermint/tendermint#8625 PR now? |
@torao |
50 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The function
OnStart()
starts a goroutine to handle block events and transactions continuously. However, there is no duplicate check against batch before performing an invocation ontxIdxr.AddBatch()
. Moreover, a new transaction containing failed results may override a successful transaction that has already been indexed in the db, which may lead to confusion in accounting calculations.This PR addresses the above issue. And the content is the same as here.