Installed latest Bitcoin-Qt, fully synced, but 'getreceivedbyaddress' etc doesn't work?

1

I downloaded and installed Bitcoin-Qt 0.8.6, fully synced the block chain (according to the software itself) and now trying some basic commands through the console.

For some reason, getreceivedbyaddress <address> always returns zero, even for addresses that I know contain some bitcoins.

For example: getreceivedbyaddress 1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX gives 0.00000000 (mini-screenshot), yet we can all verify that this address actually did receive bitcoins (see comment).

Restarted the software several times, restarted my PC, and also tried doing this from the command line using bitcoind instead of the Bitcoin-Qt user interface, still the same result.

Am I doing something wrong or misunderstanding Bitcoin-Qt?

Monty Carlo

Posted 2014-03-10T15:52:17.110

Reputation: 303

Question was closed 2014-03-18T22:48:19.160

Can't post more than 2 links, but here's to show that this address indeed has a positive BTC balance: https://blockchain.info/address/1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX

Monty Carlo 2014-03-10T15:52:40.077

The answer is here: http://bitcoin.stackexchange.com/a/19739/1878

goodguys_activate 2014-03-10T18:46:28.287

try bitcoind listaddressgroupings see if that shows which address the BTC are in.hafnero 2014-03-11T08:59:02.707

Answers

2

getreceivedbyaddress only works for your addresses, i.e. those for which the private key is in your wallet. Those are the only addresses for which bitcoin-qt keeps indexed transaction data. Getting balance and transaction information for arbitrary addresses is unfortunately not supported by bitcoin-qt; sites like blockchain.info write custom software that manually parses the block chain.

See also this answer.

Nate Eldredge

Posted 2014-03-10T15:52:17.110

Reputation: 21 420

Thanks, that explains it. Is there a way to (perhaps temporarily) add such addresses to my wallet? Because I don't have the private key, I can only do so in a read-only way (like a 'watch only' wallet or address) but is this supported at all by Bitoin-Qt / bitcoind?Monty Carlo 2014-03-10T17:14:50.653

Now that I think of it, perhaps this could be faked by somehow importing this address in an encrypted wallet, with a dummy private key? Bitcoin-Qt won't ask for my password (and hence, not use this private key at all) until I actually try to spend something...?Monty Carlo 2014-03-10T17:16:18.717

@Monty: I believe that bitcoin-qt does not have support for watch only wallets, though other clients might. Your encrypted wallet suggestion might work, I suppose, but it sounds like a lot of work.Nate Eldredge 2014-03-11T13:08:37.870

2

I believe that getreceivedbyaddress only reports on addresses that are in your wallet. It doesn't allow you to look up arbitrary addresses, like the 1Dorian one.

ChrisW

Posted 2014-03-10T15:52:17.110

Reputation: 840