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?

  • "bitcoin-cli -testnet getreceivedbyaddress 'mvKoQLrzovNbgALa2D7prh9pagd2QUKpWo'" returns the correct amount, but balance of the whole wallet still says 0. I'm beyond confused – SethMcGuire Feb 22 '18 at 1:29
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.

  • Thank you so much, Adam! I was running on testnet, but my watchonly was equal to false. You're the man, dude! – SethMcGuire Feb 22 '18 at 2:15
  • Is there a list somewhere of all the bitcoin.conf options? I can't seem to find one – SethMcGuire Feb 22 '18 at 2:21
  • en.bitcoin.it/wiki/…. I believe it's not all the options but the most used ones. – Adam Feb 22 '18 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.