Problem: Testnet wallet account “elmo” is showing a balance of 1.02 but should instead show 0.01.
0bitcoin-cli -testnet getinfo
1{
2 "version" : 100000,
3 "protocolversion" : 70002,
4 "walletversion" : 60000,
5 "balance" : 2.66964380,
6 "blocks" : 350108,
7 "timeoffset" : 0,
8 "connections" : 0,
9 "proxy" : "",
10 "difficulty" : 1.00000000,
11 "testnet" : true,
12 "keypoololdest" : 1426225664,
13 "keypoolsize" : 101,
14 "paytxfee" : 0.00000000,
15 "relayfee" : 0.00001000,
16 "errors" : ""
17}
18
19bitcoin-cli -testnet listaccounts
20{
21 "" : 1.64964380,
22 "elmo" : 1.02000000,
23}
24
25bitcoin-cli -testnet getbalance elmo
261.02000000
27
28bitcoin-cli -testnet listreceivedbyaccount 1 true
29[
30 {
31 "account" : "",
32 "amount" : 2.06080000,
33 "confirmations" : 1040
34 },
35 {
36 "account" : "elmo",
37 "amount" : 1.02000000,
38 "confirmations" : 22149
39 },
However when using listunspent
to examine the UTXO in the wallet, there is only one UTXO assigned to the account “elmo” and this UTXO shows a balance of 0.01.
0{
1 "txid" : "42e2579dd090415713510c5cc58aa13afd14cfc2a1fb6ebee873afc169927e8b",
2 "vout" : 0,
3 "address" : "myZ2mEYZt1CyRPgdE6oXRbAJWbaaTtTwRi",
4 "account" : "elmo",
5 "scriptPubKey" : "76a914c5d6d3854e653be3c31e66d322cb0a05cb0a17c888ac",
6 "amount" : 0.01000000,
7 "confirmations" : 22149,
8 "spendable" : true
9}
Here are the two addresses associated with account “elmo”
0bitcoin-cli -testnet getaddressesbyaccount elmo
1[
2 "mkwLg4ARNWimVW1Bh9uxv9SKdfNnPHRHWr",
3 "myZ2mEYZt1CyRPgdE6oXRbAJWbaaTtTwRi"
4]
Two separate block explorers report the balance of each address as:
http://tbtc.blockr.io/address/info/myZ2mEYZt1CyRPgdE6oXRbAJWbaaTtTwRi https://www.blocktrail.com/tBTC/address/myZ2mEYZt1CyRPgdE6oXRbAJWbaaTtTwRi 0.01
http://tbtc.blockr.io/address/info/mkwLg4ARNWimVW1Bh9uxv9SKdfNnPHRHWr https://www.blocktrail.com/tBTC/address/mkwLg4ARNWimVW1Bh9uxv9SKdfNnPHRHWr 0
So it appears that bitcoind is returning an incorrect balance of 1.02 instead of 0.01.