Post
Topic
Board Development & Technical Discussion
Re: getbalance, sendtoaddress require full sync with recent chain data?
by
starmyc
on 13/06/2018, 10:31:13 UTC
GetBalance and listaccounts returns an incorrect balance (testnet)


You should open a new topic because this is a totally unrelated problem.

Problem: The testnet account Testnet "elmo" shows a balance of 1.02 but should 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},

Your client is not up to date, as you have only 350108 blocks when there is more than 1.3 M currently in the testnet chain. Please synchronize it and you'll get correct balances.