bitcoin-cli getbalance shows zero wallet balance after reindexing #20453

issue cryptoqube777 opened this issue on November 22, 2020
  1. cryptoqube777 commented at 12:13 PM on November 22, 2020: none

    I have encountered the following issue while using Bitcoin Core 0.20.1

    Initially I started bitcoind with txindex=0 in configuration file Later I changed this option to txindex=1 and restartted bitcoind with -reindex key

    After complete reindexing I have the following issue getbalance shows 0 (which makes impossible to use sendtoaddress resulting "Insufficient funds" error message) getreceived by address shows correct amount of 0.604 BTC

    Before reindexing everything worked perfect. Only txindex option was changed in bitcoin.conf and -reindex key added to command line parameters. No other changes were made. Reindex was completed, since getblockcount shows correct blockchain block count.

    I am running Bitcoin Core v.0.20.1 on Debian 10 on Testnet3

  2. cryptoqube777 added the label Bug on Nov 22, 2020
  3. cryptoqube777 commented at 4:34 PM on November 22, 2020: none

    Additional issue, which I suppose concerns previous: I'm using single walletm but with several labels Each label has only 1 address, generated by bitcoin-cli getnewaddress label I have 0.0011 BTC on one address After i send 0.0001 BTC to second address within my wallet I have the following output: bitcoin-cli getbalance returns 0.0001 bitcoin-cli listreceivedbyaddress "address" 0 for each of two addresses returns 0.0011 for the first one 0.0001 for the second one

    And after this i can use sendtoaddress only within 0.0001 balance of second address.

  4. maflcko added the label Wallet on Nov 23, 2020
  5. willcl-ark commented at 3:32 PM on November 2, 2022: contributor

    I could not replicate the issue in either the first or second comments here using Signet on Ubuntu 22.04. I created a wallet with one labelled address which I sent 0.001 to, before restarting with txindex=1 and -reindex. After this was complete I checked getbalance which did indeed return the correct balance. I created a second labelled address and sent part of the balance there. getbalance also showed the correct balance after this as well as listreceivedbyaddress.

    I wonder whether @cryptoqube777 had set -spendzeroconfchange or another config flag which might affect the output of getbalance if they were making transactions?

    Given that nobody else has reported the same issue in 2 years and it does not seem to be reproducible using the steps provided, perhaps this can be closed?

  6. maflcko commented at 3:36 PM on November 2, 2022: member

    Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?

  7. maflcko closed this on Nov 2, 2022

  8. bitcoin locked this on Nov 2, 2023

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:14 UTC

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