wallet showing incorrect (too high) balance #1164

issue rebroad opened this issue on April 29, 2012
  1. rebroad commented at 7:22 PM on April 29, 2012: contributor

    Wallet balance is incorrect. I have totalled the transactions, and these match the total of the amounts in my bitcoin addresses. The balance is showing much more than both of these, so I know it is incorrect.

    It first went above the correct value upon running a bitcoin-qt -rescan

  2. Diapolo commented at 9:57 PM on April 29, 2012: none

    As you have opened quite a few issues over the last days, could you please give more details. Used version, OS and perhaps the difference you found out ... what is displayed and what was your sum? Thanks!

  3. sipa commented at 1:39 AM on April 30, 2012: member

    does getbalance also report the incorrect balance? what about getbalance "*"? Or is it only limited to the GUI?

  4. rebroad commented at 3:54 PM on April 30, 2012: contributor

    Now running 0.6.1 RC1 and still reporting incorrect balance in the GUI, but now against unconfirmed rather than balance. However, I'm not up to date on the chain, so will update this when I am.

  5. laanwj commented at 7:51 AM on May 15, 2012: member

    Have you checked, does this still happen when you are up to date?

  6. ripper234 commented at 7:30 PM on July 10, 2012: none

    Happens to me with Bitcoin 0.6.3.

    I switched the wallet file a few times, then ran bitcoin --rescan (old version of Bitcoin) and bitcoin-qt --rescan (Bitcoin 0.6.3).

    Only now I realized the correct switch is -rescan and not --rescan. Still, I don't understand why the balance displayed should be lower than the sum of all transactions shown in the GUI.

  7. rebroad commented at 3:30 PM on September 1, 2012: contributor

    This is still happening with 0.7.0. It causing bitcoins I've sent to not be confirmed. The block has caught up to 12 days beyond the transactions that sent the money, and they're still showing as unconfirmed. It should be able to determine that it tried using spent coins, and invalidate them instead of forever showing them as unconfirmed, surely?

  8. gmaxwell commented at 4:10 PM on September 1, 2012: contributor

    @rebroad You haven't provided enough information to determine the cause of your problem or to reproduce it.

    An incorrect balance display won't cause it to produce invalid transactions— the only ways I'm aware of to cause that is to run the same wallet on multiple systems or restoring a backup and sending before its caught up with the pre-restore transactions; perhaps you have two issues.

  9. rebroad commented at 10:53 PM on September 1, 2012: contributor

    @gmaxwell I think it's one cause. i.e. probably caused by running the same wallet on multiple systems, but more than one symptom as a result. Are issues linked to number of causes or number of symptoms? I'd like to think the former, and if so, it's therefore only one issue, certainly one solution, IMHO. The solution I propose is that this can be (and should be) fixed during the -rescan operation, whereby the balance should be corrected based upon the transaction history for the addresses in the wallet. Also, as a matter of course, whenever a transaction is found to be invalid (due to the inputs having already been used), it should be shown as invalid, rather than remain "unconfirmed", IMHO.

  10. gmaxwell commented at 1:04 AM on September 2, 2012: contributor

    It would be disastrous for a rescan to remove transactions that the wallet knows about. That particular proposal is a non-starter. (identifying conflicted txn and providing a facility to remove them would be great, but it must never erase accounting records on its own). Though I can't think of how this would cause a too-high balance: even if you have payments to yourself they shouldn't be included unless they're confirmed. If it is I'm fairly sure it's another bug.

  11. rebroad commented at 5:26 AM on March 25, 2013: contributor

    I would like to help troubleshoot this issue. I still have the wallet.dat file which shows the incorrect balance - the balance is too high and totals more than the total of all the transactions. Regardless of how I created this problem, surely the balances should equate to the total of the transactions in all cases.

  12. laanwj commented at 1:35 PM on April 23, 2014: member

    Should be fixed in 0.9.0 (by #3694), as the spendable outputs are now computed on the fly instead of stored in the wallet.

  13. laanwj added the label Wallet on May 13, 2014
  14. laanwj closed this on May 13, 2014

  15. suprnurd referenced this in commit ec59862506 on Dec 5, 2017
  16. lateminer referenced this in commit 0cc2976bbc on Dec 25, 2019
  17. Bushstar referenced this in commit 00e929a522 on Oct 21, 2020
  18. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 15:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me