negative balance #9887

issue btcid opened this issue on February 28, 2017
  1. btcid commented at 7:35 AM on February 28, 2017: none

    Describe the issue

    Can you reliably reproduce the issue?

    If so, please list the steps to reproduce below:

    bitcoin-cli getbalance '*' and bitcoin-cli listaccounts

    Expected behaviour

    same as bitcoin-cli getbalance the result is 61.65250439

    Actual behaviour

    bitcoin-cli getbalance '*'
    -14.03410034
    
    bitcoin-cli listaccounts
    {
      "": -14.03410034
    }
    

    Screenshots.

    If the issue is related to the GUI, screenshots can be added to this issue via drag & drop.

    What version of bitcoin-core are you using?

    "version": 130200, "protocolversion": 70015, "walletversion": 130000,

    Machine specs:

    • OS: Ubuntu 16.04
    • CPU: 4
    • RAM: 8Gb
    • Disk size: 200Gb
    • Disk Type (HD/SDD): SSD
  2. jonasschnelli commented at 7:59 AM on February 28, 2017: contributor

    AFAIK this has to do with the internals of the accounting system.

    Related: #3810 #3816 #2079

  3. jonasschnelli added the label Wallet on Feb 28, 2017
  4. ryanofsky commented at 10:39 AM on February 28, 2017: member

    Also #9614. bitcoin-cli getbalance and bitcoin-cli getbalance * compute balances differently, and the latter can (temporarily) show low or negative balances if there are multiple unconfirmed transactions that spend the same inputs. From #9614, "The biggest difference is that GetBalance sums up all unspent TxOuts paying to the wallet, while [getbalance *] sums up both spent and unspent TxOuts paying to the wallet, and then subtracts the values of TxIns spending from the wallet."

  5. laanwj commented at 11:22 AM on February 28, 2017: member

    Yes, this is a known issue, that will go away when the accounting system (which is already deprecated) goes away. @ryanofsky @jonasschnelli thanks for summarizing.

  6. laanwj closed this on Feb 28, 2017

  7. 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:15 UTC

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