bitcoin-cli says transaction amount and balance are 0, but that's not the case

0

I imported a few TestNet addresses and sent some funds to one of them. When I run

bitcoin-cli getaccount mvKoQLrzovNbgALa2D7prh9pagd2QUKpWo

it responds with the account I named it to.

I sent 1.1BTC to that address, as can be seen here but when I run gettransaction it says amount: 0, but everything else looks correct. getbalance also returns 0. What am I doing wrong here?

Setheroni

Posted 2018-02-22T00:27:56.027

Reputation: 7

"bitcoin-cli -testnet getreceivedbyaddress 'mvKoQLrzovNbgALa2D7prh9pagd2QUKpWo'" returns the correct amount, but balance of the whole wallet still says 0. I'm beyond confusedSetheroni 2018-02-22T01:29:26.277

Answers

0

it seems to be that you are not on the testnet network. and i noticed that you're sending the commands with attaching -testnet

bitcoin-cli -testnet getreceivedbyaddress 'mvKoQLrzovNbgALa2D7prh9pagd2QUKpWo'"

To run Bitcoin on testNet

Stop Bitcoin and open ~./bitcoin/bitcoin.conf using any text editor.

and add testnet=1 save and close.

try bitcoin-cli listunspent 0 9999 you should see the transaction.

Anyway if you were already running it on testnet network

try the following command to get address balance

bitcoin-cli getbalance "" 0 true

Arguments:

  1. "account" (string, optional)

  2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.

  3. include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses.

Adam

Posted 2018-02-22T00:27:56.027

Reputation: 3 215

Thank you so much, Adam! I was running on testnet, but my watchonly was equal to false. You're the man, dude!Setheroni 2018-02-22T02:15:04.107

Is there a list somewhere of all the bitcoin.conf options? I can't seem to find oneSetheroni 2018-02-22T02:21:10.173

https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File. I believe it's not all the options but the most used ones.Adam 2018-02-22T03:05:47.090