2

So I have ubuntu 16x running bitcoin core. Its a full node and fully synched. Run with bitcoind --daemon as suggested. Using a particular address from my wallet, whenever I send money to the address getblanace works fine (bitcoin-cli getbalance XXXX 1). Whenever I send money from the address, (on a completely different system using a web based wallet), it shows that the bitcoins arrive when expected, but my getbalance of my correct address never goes down. I even tried sending all the money out in 10 different transactions and saw it was failing when the the account should have been zero'd out, all the while always reporting that I had my high original balance.

I feel like I am missing something basic but I can't seem to figure it out. Thank you in advance

  • Have the transactions confirmed? – JBaczuk Oct 4 '18 at 16:48
  • Yea all the transaction have a dozen or so confirmations at this point, and they show up in the other wallet and I can spend them in the new wallet. – noone392 Oct 4 '18 at 17:11
  • that also shows the incorrect balance. – noone392 Oct 4 '18 at 17:22
  • Does bitcoin core have all the latest blocks? $ bitcoin-cli getblockcount – JBaczuk Oct 4 '18 at 17:23
  • wait there is a mysterious entry at the top of list accounts that says "" -0.00145718 which is approximately what i have sent from that address!? – noone392 Oct 4 '18 at 17:23
1

The issue that you are experiencing is not really an issue. Rather it is a fundamental misunderstanding of how the accounts system works. Because it is so unintuitive and behaves in an unexpected way, the accounts system has been removed from Bitcoin Core.

The behavior that you see is completely expected. Accounts are not involved in the sending of Bitcoin except for the internal account values are decreased. The association of addresses to accounts is a receiving only thing. Account balances are only updated when addresses for the account receive money. Sending money "from" those addresses will not update the balance. The account balance will be decreased only if you use the send* RPC commands which allow you to specify an account to decrement the amounts from.

It is also important to note that "sending from" an account does not mean that coins associated with the addresses in that account will be the only ones chosen for the transaction. Any coins can be chosen, and then the account's balance will be decremented. Because of this, it is also possible to have accounts with a negative balance.

In general, you should stop using the accounts system. Not only is it being removed, but it also has strange and unexpected behavior.

  • Thank you so much this, I couldn't find this information anywhere! Looking at the new API it doesn't appear that its possible to get a balance of a particular label or a particular address? Is it now only possible to get the balance of an entire wallet? If so is it possible to have multiple wallets with a single 0.17 node? – noone392 Oct 8 '18 at 17:53
  • Yes, you cannot get the balance of a label that doesn't really make sense because a label is not an account. Bitcoin Core has supported having multiple wallet loaded for a few versions now. With 0.17, you can dynamically create and load them. You will want to use createwallet and loadwallet. – Andrew Chow Oct 8 '18 at 22:21
0

(bitcoin-cli getbalance XXXX 1) ... getbalance of my correct address never goes down

XXXX there is an account name for getbalance.

As JBaczuk commented

The accounts feature is very confusing and has been removed in the latest version v0.17.0.

(strictly speaking it is deprecated in 0.17 and expected to be fully removed in 0.18.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.