forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 718
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] Don't add P2CS automatically to GetLockedCredit #1264
Merged
random-zebra
merged 1 commit into
PIVX-Project:master
from
random-zebra:2020_locked_delegations
Jan 14, 2020
Merged
[Wallet] Don't add P2CS automatically to GetLockedCredit #1264
random-zebra
merged 1 commit into
PIVX-Project:master
from
random-zebra:2020_locked_delegations
Jan 14, 2020
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
furszy
approved these changes
Jan 14, 2020
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.
utACK 4789652.
random-zebra
added a commit
that referenced
this pull request
Jan 14, 2020
4789652 [Wallet] Don't add P2CS automatically to CWalletTx::GetLockedCredit (random-zebra) Pull request description: Prior to #1223 the total balance was calculated as `balance + delegatedBalance - nLockedBalance`, so the delegations (being part of each term) were counted only once. #1223 removed `nLockedBalance` (changing the total balance calculation to `balance + delegatedBalance`) thus counting the delegation twice. #1261 fixed the total balance calculation, removing `delegatedBalance`. Finally, this PR fixes `nLockedBalance` (even though not part of the total balance anymore). The error is in `GetLockedCoins` which is returning the sum of locked coins **and** cold-stake delegations owned (regardless of their locking state). ACKs for top commit: furszy: utACK 4789652. Tree-SHA512: 25b7b65f013f84fac5c0ffdbffb2770264926154d3c5a909144f41ee3358cdf87f85e28199006dd8cfc1420aa688b0b0d4574ea64998c3f218015a6636a7b718
Mrs-X
approved these changes
Jan 14, 2020
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.
Makes sense, utACK 4789652
Fuzzbawls
pushed a commit
to Fuzzbawls/PIVX
that referenced
this pull request
Jan 16, 2020
Github-Pull: PIVX-Project#1264 Rebased-From: 4789652
furszy
added a commit
that referenced
this pull request
Jan 16, 2020
4663310 [GUI] Min window size (furszy) 5c76d51 Doc: Update manpages for 4.0.2 (Fuzzbawls) 79bfec9 Build: Bump version to 4.0.2 (Fuzzbawls) 82d0af7 Doc: Update release notes for 4.0.2 (Fuzzbawls) 3432e29 [GUI] Transaction record cold staking fixes. (furszy) e5badbc [RPC] Don't do extra PoW round for pos blocks in 'generate' RPC Github-Pull: #1274 Rebased-From: 6b5ce00 (random-zebra) 7b8169c [Trivial] Update copyright headers for 4.0.2 (Fuzzbawls) 8faf4bf [Core] Update checkpoints for first v7 block (Fuzzbawls) f6e8a14 [GUI] Add latest block number to topbar pushButtonSync Github-Pull: #1268 Rebased-From: 84b4ae4 (random-zebra) 8edfa83 [GUI] Connect P2CSUnlockOwner and P2CSUnlockStaker records to the model Github-Pull: #1265 Rebased-From: 4b24380 (random-zebra) e475827 [GUI] CoinControlDialog, removing extra spacing char from the copy to clipboard texts. (furszy) dbe2b3a [GUI] CoinControlDialog, copy to clipboard action implemented on every showed label + inform snackbar notifying the user. (furszy) 3404bd9 [Wallet] Don't add P2CS automatically to CWalletTx::GetLockedCredit Github-Pull: #1264 Rebased-From: 4789652 (random-zebra) d1f5731 [GUI] Force NavMenu to show dashboard button at startup. (furszy) cdee261 [GUI] Open the app's window in the smallest, currently available, size. (furszy) fc766c8 [GUI] TransactionRecord type P2CSDelegationSentOwner and P2CSDelegationSent distinction. (furszy) 49de2e4 [Qt][Bug] Load the most recent instead of the first transactions (Fuzzbawls) 827ca3e [Bug][GUI] Double counted delegated balance fix. (furszy) Pull request description: Updates the `4.0` branch with relevant merged PRs in preparation for tagging the `4.0.2` release. Included PRs: #1261 #1267 #1263 #1266 #1264 #1269 #1265 #1268 #1273 #1272 #1274 #1279 Top commit has no ACKs. Tree-SHA512: 561d9319d08756c040751c6ce145505610ed2ebc4351a87d9d3bb05ecb98df9f35d492e9e3eb7e111ce611268c4a24bb13720e3f81917a671038f8ab23f14de4
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.
Prior to #1223 the total balance was calculated as
balance + delegatedBalance - nLockedBalance
, so the delegations (being part of each term) were counted only once.#1223 removed
nLockedBalance
(changing the total balance calculation tobalance + delegatedBalance
) thus counting the delegation twice.#1261 fixed the total balance calculation, removing
delegatedBalance
.Finally, this PR fixes
nLockedBalance
(even though not part of the total balance anymore). The error is inGetLockedCoins
which is returning the sum of locked coins and cold-stake delegations owned (regardless of their locking state).