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?

  • 1
    Is your shell replacing * with something else? What happens if you run echo getbalance * 1 ? – Nick ODell Aug 15 '17 at 23:40
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.

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.