Problem: Testnet wallet account "elmo" is showing a balance of 1.02 but should instead show 0.01.
bitcoin-cli -testnet getinfo
{
"version" : 100000,
"protocolversion" : 70002,
"walletversion" : 60000,
"balance" : 2.66964380,
"blocks" : 350108,
"timeoffset" : 0,
"connections" : 0,
"proxy" : "",
"difficulty" : 1.00000000,
"testnet" : true,
"keypoololdest" : 1426225664,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"relayfee" : 0.00001000,
"errors" : ""
}
bitcoin-cli -testnet listaccounts
{
"" : 1.64964380,
"elmo" : 1.02000000,
}
bitcoin-cli -testnet getbalance elmo
1.02000000
bitcoin-cli -testnet listreceivedbyaccount 1 true
[
{
"account" : "",
"amount" : 2.06080000,
"confirmations" : 1040
},
{
"account" : "elmo",
"amount" : 1.02000000,
"confirmations" : 22149
},
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.
{
"txid" : "42e2579dd090415713510c5cc58aa13afd14cfc2a1fb6ebee873afc169927e8b",
"vout" : 0,
"address" : "myZ2mEYZt1CyRPgdE6oXRbAJWbaaTtTwRi",
"account" : "elmo",
"scriptPubKey" : "76a914c5d6d3854e653be3c31e66d322cb0a05cb0a17c888ac",
"amount" : 0.01000000,
"confirmations" : 22149,
"spendable" : true
}
Here are the two addresses associated with account "elmo"
bitcoin-cli -testnet getaddressesbyaccount elmo
[
"mkwLg4ARNWimVW1Bh9uxv9SKdfNnPHRHWr",
"myZ2mEYZt1CyRPgdE6oXRbAJWbaaTtTwRi"
]
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.