bitcoin core 0.13.1: Inconsistent getbalance result from RPC

1

I have a node which is giving inconsistent results from RPC:

$ bitcoin-cli getbalance 
0.01647763
$ bitcoin-cli getbalance "*" 1
1.90937153
$ bitcoin-cli getbalance "" 1
1.90937153
$ bitcoin-cli getbalance * 1
0.00000000
$ bitcoin-cli listaccounts
{
  "": 1.90937153
}

Not sure how can I interpret this. Does my wallet have 0, 0.01647763 or 1.90937153? Documentation for getbalance says that if you don't pass any arguments, the defaults are * (all accounts) and 1, but when I specify those arguments, the result is not the same.

What are the real defaults when not specifying arguments to getbalance?

ympostor

Posted 2017-08-15T07:56:14.120

Reputation: 121

1Is your shell replacing * with something else? What happens if you run echo getbalance * 1 ?Nick ODell 2017-08-15T23:40:01.293

Answers

1

I think I've hit a bitcoin-core bug that may happen in weird circumstances (such as when trying to send a transaction which the node refuses to send, by returning a "rejected" error code). After I restarted the server, the transaction showed up in the bitcoin network, and the getbalance RPC calls started to be consistent again.

ympostor

Posted 2017-08-15T07:56:14.120

Reputation: 121