-
Notifications
You must be signed in to change notification settings - Fork 278
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
wallet: update unconfirmed locked balance first during rescan #387
Conversation
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.
LGTM with a couple of nits on comments.
@boymanjor thanks bruh. Updated those comments and pushed. |
Codecov Report
@@ Coverage Diff @@
## master #387 +/- ##
==========================================
+ Coverage 60.37% 60.42% +0.05%
==========================================
Files 129 129
Lines 34671 34673 +2
Branches 5859 5860 +1
==========================================
+ Hits 20931 20952 +21
+ Misses 13740 13721 -19
Continue to review full report at Codecov.
|
I'd like to investigate if we should solve this issue further up the call stack.
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.
Ok, I think this is the right spot. Thanks for the clarification @pinheadmz!
Closes #381
Replaces #385
Explanation here: #381 (comment)
The test runs through the REVEAL of an auction two ways: First, by sending and then confirming each covenant. Second, by JUST confirming each covenant without first "sending". The difference from perspective of the txdb is that if a TX is not already inserted in an unconfirmed state, the balances will be wonky when the TX is confirmed.
Like #387 the patch is to first quickly update the "unconfirmed" data for a TX before proceeding (in the case where txdb sees a TX for the very first time, in a block)