-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Database indexing: fix mismatching balances/sent/received, negative balances etc #316
Database indexing: fix mismatching balances/sent/received, negative balances etc #316
Conversation
33967bd
to
a4677a4
Compare
Includes new db lock setting during indexing and also displays initial_index_alert warning whilst locked. I found that allowing API requests to save transactions out of order during indexing causes balance issues, whilst this new setting limits functionality during indexing, it does help ensure balances are accurate. |
@uaktags @cryptozeny @iquidus would appreciate your thoughts |
a4677a4
to
f8289fe
Compare
wow i will look as soon as possible |
f434e83
to
73c6be6
Compare
received = received + amount; | ||
} | ||
if (unique == true) { | ||
if ((unique == true) || (type != tx_array[index].type)) { |
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.
There was some duplicated code here, have stripped it down as it wasn't catching tx's sent to self properly
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.
ACK
beacd19
to
318f8eb
Compare
318f8eb
to
84cfbea
Compare
Included in PR #319 |
Continued in #319 |
i did
|
Currently testing these changes out with a reindex to see if the balance discrepancies are resolved.
Would fix:
#293
uaktags#42
sugarchain-project#13
Relates to changes since:
#6
So far everything seems to be working well now - if you do have balance issues then you'll want to reindex after merging this PR. I advise turning on the lock_during_index setting to ensure API calls don't mess up balances out of order.
A reindex is NOT required with this PR - only advised if you have balance issues.