<p>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 <code>getbalance</code> RPC calls started to be consistent again.</p>

CC BY-SA 3.0
2017-08-16T03:23:42.230Z
2017-08-16T03:23:42.230Z
ympostor
<p>I have a node which is giving inconsistent results from RPC:</p>

<pre><code>$ 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
}
</code></pre>

<p>Not sure how can I interpret this. Does my wallet have 0, 0.01647763 or 1.90937153? <a href="https://bitcoin.org/en/developer-reference#getbalance" rel="nofollow noreferrer">Documentation</a> 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.</p>

<p>What are the real defaults when not specifying arguments to <code>getbalance</code>?</p>

CC BY-SA 3.0
2017-08-15T23:40:01.293Z
Is your shell replacing `*` with something else? What happens if you run `echo getbalance * 1` ?
Nick ODell
<bitcoin-core><json-rpc>
bitcoin core 0.13.1: Inconsistent getbalance result from RPC
ympostor
# bitcoin core 0.13.1: Inconsistent getbalance result from RPC

(Asked by: username_0 on 2017-08-15)

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?

**Tags:** bitcoin-core, json-rpc

> **Comments:**
> **username_1**: Is your shell replacing `*` with something else? What happens if you run `echo getbalance * 1` ?  

---

## 1 answers

### Answer by username_0 on 2017-08-16. Score: 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.


---

