-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
getbalance/getbalance '*' discrepancy #172
Comments
Do you know if there is any applicable workaround ? I have a case where I imported a lot of private keys into a wallet, and there's starting to be a very significant discrepancy between what Any help whatever small would be immensely appreciated ! |
Two changes: Use IsConfirmed() instead of IsFinal(), so 'getbalance "*" 0' uses the same 'is this output spendable' criteria as 'getbalance'. Fixes issue bitcoin#172. And a tiny refactor to CWallet::GetBalance() (redundant call to IsFinal -- IsConfirmed calls IsFinal). getbalance with no arguments and 'getbalance "*" 0' could return different different results,
Two changes: Use IsConfirmed() instead of IsFinal(), so 'getbalance "*" 0' uses the same 'is this output spendable' criteria as 'getbalance'. Fixes issue bitcoin#172. And a tiny refactor to CWallet::GetBalance() (redundant call to IsFinal -- IsConfirmed calls IsFinal). getbalance with no arguments and 'getbalance "*" 0' could return different different results,
Was fixed by #2272 a long time ago, closing |
Two changes: Use IsConfirmed() instead of IsFinal(), so 'getbalance "*" 0' uses the same 'is this output spendable' criteria as 'getbalance'. Fixes issue #172. And a tiny refactor to CWallet::GetBalance() (redundant call to IsFinal -- IsConfirmed calls IsFinal). getbalance with no arguments and 'getbalance "*" 0' could return different different results,
Changed http:// to https:// on some links
7855f5c [Utils] makeseeds script update (Fuzzbawls) cd239ab [Wallet] Update checkpoints with v2.2 chain (presstab) 82f66ee [Utils] Add ExecStop= to example systemd service (Aaron Miller) 0d5709a [Qt] Sendcoinsdialog: more place for long locales (Mrs-X) 1583fc2 Remove legacy Dash code IsReferenceNode (Jon Spock) 9a05301 Change alert public key to disable it by zeroing out the first few digits (Jon Spock) Tree-SHA512: d5fae27f6def8e613cfe8126906a25a22dfe7ea1ce2c06a53084242b7312e25364a802c322560106c3757c9761fd93c0dc38e638b21175f21840bea22d59d1f7
Show correct version number in debug window info
…ejection-tests Automated tests for PoS blocks to verify that invalid PoS block are correctly rejected when received over the network.
auxpow primitives update, auxpow rpc block update
PHR-20 Changed text highlighted color to system default
getbalance and getbalance '*' can return different amounts for 0-confirmation transactions, because of the way change transactions are counted. The discrepancy resolves as soon as the transaction is accepted into a block.
Details: CWalletTx::IsConfirmed() returns false for at least some 0-confirmation transactions loaded from a wallet, because they are missing vtxPrev (supporting transactions). That causes the issue, because getbalance (and the send methods) only count outputs of confirmed transactions as available, but GetAmounts (used by getbalance '*') assumes that change TxOuts are always available to be spent.
The text was updated successfully, but these errors were encountered: