Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: makeholer on January 20, 2018, 02:52:21 AM



Title: Balance doesn't change bitcoind
Post by: makeholer on January 20, 2018, 02:52:21 AM
Im trying to use testnet, generated some addresses, when i type "bitcoin-cli getaddressesbyaccount main" i can see the addresses like this


[
  "mfa1WF1oh4nYpVBNrswREzxCqzZBkNmaFc",
  "mqZiAjeiigg9PXiZBnceNgWuoALvbNYryr",
  "n1zGuGPwXM43t2xJhWbyQaYrQSCB8rwnuH"
]

Them i send some faucet to any of them, and the btc never reach the account, when i type "bitcoin-cli getbalance main"

it always say balance: 0

Tried many faucets and it shows my balance bitcoins on the transaction (website).

What im missing?


Title: Re: Balance doesn't change bitcoind
Post by: makeholer on January 20, 2018, 03:16:35 AM
Well, it suddenly shows now, and i dont know why, this sux =(


{
1.82000000
}


Title: Re: Balance doesn't change bitcoind
Post by: HCP on January 20, 2018, 03:19:46 AM
Don't use "main"... the "account name" parameter has been deprecated according to the docs. try just using:
Code:
bitcoin-cli getbalance
or
Code:
bitcoin-cli getbalance "*"


If you're still getting 0.00000000 using getbalance, then maybe it is simply because your testnode is not synced and it hasn't seen the transactions where your addresses receive the faucet payments. Try checking:
Code:
bitcoin-cli getnetworkinfo
and
Code:
bitcoin-cli getblockchaininfo

And make sure everything is as it should be (connections OK, number of blocks = current testnet blockheight etc)


EDIT: quite likely just because your node wasn't synced... TestNet can be a bit "odd" at times